本站资源收集于互联网,不提供软件存储服务,每天免费更新优质的软件以及学习资源!

Dreamwaver如何设定div层的对齐方式

电脑教程 diannaojiaocheng 1℃

Dreamwaver如何设定div层的对齐方式
在Dreamwaver中设计div层的时候,属性面板没有像表格一样给出水平、垂直对齐方式的选项,使用下面的代码可以做到:

 Dreamwaver如何设定div层的对齐方式:

<html>
<head>
<style. type="text/css">
<!–
div{
 border:1px solid #000000;
 text-align:center;
 padding-top:expression(parseInt(this.style.height)/2-parseInt(this.childNodes(0).scrollHeight)/2);
}
//–>
</style>
</head>
<body>
请将 图片(可多张) 或 其它内容 插入<span></span>标签中<br>
<div style="width:200px;height:200px">
 <span>
  <img src="/images/grss.gif"><br>
  <img src="/images/grss.gif"><br>
  <img src="/images/grss.gif">
 </span>
</div>
<P>
<div style="width:200px;height:200px">
 <span>
  <img src="http://www.baidu.com/img/logo.gif"/>
 </span>
</div>
<P>
<div style="width:200px;height:200px">
 <span>
  asddsf
 </span>
</div>
<P>
</body>
</html>

以上就是Dreamwaver如何设定div层的对齐方式,希望大家喜欢,请继续关注范的软件库。

转载请注明:范的资源库 » Dreamwaver如何设定div层的对齐方式

喜欢 (0)