我有<div>一些其中有一些<img>.每个人<img>都在自己的内心<div>.问题是外部div不会自动获取内容的高度,即使我将其高度设置为auto.同时为了显示内部div内联我将它们设置为float: left.但是,如果我删除浮动,外部div表现正常,并采取内容的高度.但我需要imgs内联.谁能帮我?
HTML:
<div id="gallery">
<div class="gal-foto">
<img src="http://farm3.staticflickr.com/2819/10183644713_c1f49eb81f_b.jpg" class="gal-img">
</div>
<div class="gal-foto">
<img src="http://farm4.staticflickr.com/3694/10183642403_0c26d59769_b.jpg" class="gal-img">
</div>
<div class="gal-foto">
<img src="http://farm4.staticflickr.com/3764/10183532675_0ce4a0e877_b.jpg" class="gal-img">
</div>
<div class="gal-foto">
<img src="http://farm6.staticflickr.com/5331/10183598286_9ab37e273c_b.jpg" class="gal-img">
</div>
<div class="gal-foto">
<img src="http://farm6.staticflickr.com/5334/10183535585_04b18fa7da_b.jpg" class="gal-img">
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS:
#gallery {
border: 1px solid;
border-radius: 10px 10px 10px 10px;
box-shadow: 0 0 15px rgba(50, 50, 50, 0.7) inset;
height: auto;
margin-top: 20px;
padding: 15px;
}
.gal-foto {
float: left;
margin: 3px; …Run Code Online (Sandbox Code Playgroud) 我使用Virtualbox在Windows XP上安装了虚拟机,我想从中访问localhost(我正在使用Wamp Server).可能吗?我在mi计算机上使用Windows 7.
我有一个深色/黑色背景图像和一个白色输入字段.我给输入字段的不透明度为50%,我希望文本/值为纯白色(#fff).但是当我应用不透明度时,它会同时影响输入元素的背景和文本.如何只更改输入字段的背景?
我试图使用jquery形式,但它在concole ajaxForm不是一个函数.正确包含了jquery.form.js,代码在文档就绪函数中...
这是脚本:
$("#apply-form").ajaxForm({
beforeSend: function()
{
$("#progress").show();
//clear everything
$("#bar").width('0%');
$("#message").html("");
$("#percent").html("0%");
},
uploadProgress: function(event, position, total, percentComplete)
{
$("#bar").width(percentComplete+'%');
$("#percent").html(percentComplete+'%');
},
success: function()
{
$("#bar").width('100%');
$("#percent").html('100%');
},
complete: function(response)
{
$("#message").html("<font color='green'>"+response.responseText+"</font>");
},
error: function()
{
$("#message").html("<font color='red'> ERROR: unable to upload files</font>");
}
});
Run Code Online (Sandbox Code Playgroud)
这是HTML表单
<form id="apply-form" enctype="multipart/form-data" method="post" action="">
<table>
<tr><td>CV:</td>
<td>
<input type="file" name="cover">
</td>
</tr>
<tr><td>Cover Letter:</td>
<td>
<input type="file" name="curriculum">
</td>
</tr>
<tr>
<td colspan="2">
<div id="progress">
<div id="bar"></div>
<div id="percent">0%</div >
</div> …Run Code Online (Sandbox Code Playgroud) 有人可以使用JQuery在Codeigniter中使用简单的AJAX分页帮助我吗?使用从数据库查询的分页列表.我在网上搜索,但所有的例子都非常复杂......提前谢谢你,对不起我的英语不好...
<form id="test">
<input type="text" name="title" value="I am title">
<div id="text1">
<input type="text" name="module-title" value="I am module title">
</div>
<div id="test2">
<input type="text" name="article-title" value="I am article title">
</div>
</form>
Run Code Online (Sandbox Code Playgroud)
如何通过jquery选择所有表单(即#test)输入字段,除了"#test2"内的所有输入字段.
jquery ×3
ajax ×2
css ×2
html ×2
ajaxform ×1
codeigniter ×1
forms ×1
input ×1
localhost ×1
opacity ×1
pagination ×1
virtualbox ×1
wamp ×1