基本上,当客户点击链接时显示的隐藏div.该div显示一个php formail,询问客户有关他/她感兴趣的产品的问题.
这是我在网上找到的代码,对我来说非常适合使用jquery:
<script type="text/javascript">
$(document).ready(function(){
$('.show_hide').showHide({
speed: 500, // speed you want the toggle to happen
easing: '', // the animation effect you want. Remove this line if you dont want an effect and if you haven't included jQuery UI
changeText: 1, // if you dont want the button text to change, set this to 0
showText: 'REQUEST A QUOTE',// the button text to show when a div is closed
hideText: 'CLOSE' // the button text to show when …Run Code Online (Sandbox Code Playgroud) 有谁知道这里发生了什么?我在opera,dolphin和工厂android浏览器上测试过.(虽然现在似乎正在制作歌剧)
div不会改变大小,但文本以某种方式缩小以适应div的一部分.无论如何要防止这种情况?
为了清楚起见,我试图在移动浏览器上实现与pc版本相同的外观.
由于问题似乎与浏览器有关,我如何强制文本占用div的整个宽度?我尝试将p标签设置为100%但没有成功.
div必须具有该宽度并与页面左侧对齐.
*更新1:我在galaxy s4上尝试过以下代码(之前在s2上尝试过)并且在opera mini和dolphin上遇到了同样的错误.可以使用opera mini模拟器在线显示错误,您只需要在某处托管html文件.
*更新2:我认为问题存在,因为当加载网页时,它以正常大小(像素)加载,因此段落仅占据页面的一小部分.然后,页面缩小以使所有内容适合页面,但文本不会传播,它会保留在初始的小空间中.

在Pc上,应该是:

我尽可能地缩小了代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="" name="keywords" />
<meta content="" name="description" />
<title></title>
</head>
<body>
<div style="width:1000px; margin-left:auto; margin-right:auto;" >
<div style="float:left; width:758px; background-color:aqua;">
<p>
Random text Random text Random text Random text Random text Random text Random text Random text
Random text Random text Random text Random text Random text …Run Code Online (Sandbox Code Playgroud) 我无法将标签上的li元素左对齐,因为它们居中.我想知道是否有人可以帮助我.
我尝试过一些东西,但最终总是破坏代码.
另外,作为一个加号,fadein对div的效果似乎不适用于opera和firefox.
这是jsfiddle:http://jsfiddle.net/guisasso/6f6PY/
CSS
.tabs {
border-bottom:3px #f2f2f2 solid;
}
.tabs li {
list-style:none;
display:inline;
color:#08c;
}
.tabs a {
padding:5px 20px;
display:inline-block;
background:#ffffff;
text-decoration:none;
color:#08c;
top: 3px;
font-size: 22px;
line-height: 140%;
padding-top: 10px;
background: #ffffff;
box-sizing: border-box;
position: relative;
border-radius: 4px 4px 0 0;
margin-bottom:3px;
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
.tabs a.active {
background: #ffffff;
border-bottom:3px orange solid;
color:#000000;
top:0px;
}
.tabs a:hover …Run Code Online (Sandbox Code Playgroud) *更新
我相信我之前错误地解释了我的问题.我想知道它是否可能有一个从上到下有两个渐变的div,从下到下也有从左到右的渐变.
Div从上半部分的颜色A1到A5,而下半部分从A6到A10.
同时,div的上半部分从颜色A1-A5变为颜色B(从左到右)
div的下半部分从颜色A6-A10变为颜色B(从左到右)
任何帮助将不胜感激,
谢谢
*更新2
所以基本上这只是一个例子:
http://jsfiddle.net/guisasso/kF9QV/6/
正确的渐变显示在左侧div(我知道我使用表格进行布局).我希望右侧的2个div以与左侧div(从上到下)相同的渐变开始,并且同时具有从左到右的渐变,因此它会淡出为白色背景那个div的结尾.
除了右边的div实际上是一个单独的div会更好,但不是必须的.
希望这能使问题清楚.
HTML
<table>
<tr>
<td rowspan="2" class="actualgradient"> </td>
<td class="toplefttoright"> </td>
</tr>
<tr>
<td class="bottomlefttoright"> </td>
</tr>
</table>
<p>Example</p>
Run Code Online (Sandbox Code Playgroud)
CSS
.horizontal
{
background: #ffb76b; /* Old browsers */
background: -moz-linear-gradient(top, #ffb76b 0%, #ffa73d 50%, #ff7c00 51%, #ff7f04 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffb76b), color-stop(50%,#ffa73d), color-stop(51%,#ff7c00), color-stop(100%,#ff7f04)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ffb76b 0%,#ffa73d 50%,#ff7c00 51%,#ff7f04 100%); /* Chrome10+,Safari5.1+ */ …Run Code Online (Sandbox Code Playgroud)