解决方案 »
- 奇怪现象,求帮助
- 弹出一个DIV层(同时此页面变为半透明不可选状态),此时DIV层中ListBox的选择某项不起作用问题
- 关于shortcut ico无法再ie中显示
- 关于模式对话框
- 这个该怎么改才好呢
- jquery设置下拉框选中状态???
- 如何实现在光标选中字符后在其前后加标记(如比加粗:[B]abcdef[/B])
- 【菜鸟求助】怎样向父页面传递加载分享变量?
- 如何取出并判断数组的值是否为空(数组是由N个同名的TEXT的值组成的)
- 我记得有一个用网站,能够在线用Javascript编辑文档,大家帮我找一下。
- 如何判断firefox浏览器???用document.all?1:0这样的方法
- 动态生成树状菜单
这样内部的div 就自动居中了,把你的图片放这个div 就可以了
<img />
<img />
</div>当然图片上不能用 float
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title><style type="text/css">#picbox{width:400px; height:300px; text-align:center; line-height:300px; border:1px #000 solid;}
#picbox span{
display:inline-block;
}
#picbox img{vertical-align:middle;}</style>
</head>
<body><div id="picbox">
<span> </span><img src="http://imgsrc.baidu.com/forum/pic/item/3cb753af54ac0fc7faed50f1.jpg" />
<img src="http://imgsrc.baidu.com/forum/pic/item/3cb753af54ac0fc7faed50f1.jpg" />
<img src="http://imgsrc.baidu.com/forum/pic/item/3cb753af54ac0fc7faed50f1.jpg" />
</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">.justify{
width:400px;
border:solid 2px red;
background:#FFFFCC;
padding:10px;
text-align:justify;
text-justify :distribute-all-lines;
}</style>
</head>
<body>
<div class="justify">
<img src="http://imgsrc.baidu.com/forum/pic/item/3cb753af54ac0fc7faed50f1.jpg" />
<img src="http://imgsrc.baidu.com/forum/pic/item/3cb753af54ac0fc7faed50f1.jpg" />
<img src="http://imgsrc.baidu.com/forum/pic/item/3cb753af54ac0fc7faed50f1.jpg" />
</div>
</body>
</html>
IE有效,FF没有效果,我再看看代码
<style type="text/css">
<!--
#Layer1 {
position:absolute;
left:282px;
top:8px;
width:559px;
height:290px;
z-index:1;
text-align:center;
}
#Layer1 img{vertical-align:middle;}
-->
</style>
</head><body>
<div id="Layer1"><img src="s2T-java/11-11/Javascirpt/chapter7/上机部分/上机答案/阶段一/images/login.gif" width="89" height="30" /></div>
</body>
</html>
<style type="text/css">
<!--
#Layer1 {
text-align:center;
}
#Layer1 img{vertical-align:middle;}
-->
</style>
</head><body>
<div id="Layer1"><img src="s2T-java/11-11/Javascirpt/chapter7/上机部分/上机答案/阶段一/images/login.gif" width="89" height="30" /></div>
</body>
</html>就可以了