<!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"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>图片透明效果</title><style type="text/css">#wrap{ width:400px; height:240px; background:url(图片/xuan5.jpg) no-repeat; margin:0 auto; }#word{ width:300px; height:200px; margin:20px 50px; background:#FFFFFF; /* for IE */ filter:alpha(opacity=40); /* CSS3 standard */ opacity:0.4; }p{ font-family:"新宋体"; font-size:24px; line-height:50px; text-align:center; } </style></head><body><div id="wrap"> <div id="word"> <p>醉梦半生<br /> 一朝邂逅<br /> 为你<br /> 写尽红尘 </p> </div></div></body></html>在Dreamweaver中,内部div块可以居中显示,但在浏览器中内部div块却是紧贴着父元素上边界,,,为什么?
- 3 回答
- 0 关注
- 1790 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消