CSS圆角
介于纯粹CSS的无图片圆角实在是代码太乱,还是倾向于利用图片结合CSS来自做圆角;
(1)高宽皆自适应:
.roundedcornr_box_510746 {
background: #dddddd url(roundedcornr_510746_grad.gif) repeat top left;width:300px;
}
.roundedcornr_top_510746 div {
background:transparent url(roundedcornr_510746_tl.gif) no-repeat top left;
}
.roundedcornr_top_510746 {
background:transparent url(roundedcornr_510746_tr.gif) no-repeat top right;
}
.roundedcornr_bottom_510746 div {
background:transparent url(roundedcornr_510746_bl.gif) no-repeat bottom left;
}
.roundedcornr_bottom_510746 {
background:transparent url(roundedcornr_510746_br.gif) no-repeat bottom right;
}
.roundedcornr_top_510746 div, .roundedcornr_top_510746,
.roundedcornr_bottom_510746 div, .roundedcornr_bottom_510746 {
width: 100%;
height: 30px;
font-size: 1px;
}
.roundedcornr_content_510746 { margin: 0 30px; }
-->
</style>
<div class="roundedcornr_box_510746">
<div class="roundedcornr_top_510746"><div></div></div>
<div class="roundedcornr_content_510746">
<h1>hello world</h1>
Lorem ipsum dolor sit amet, consectetur
adipisicing elit, sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua. Ut enim ad minim
veniam, quis nostrud exercitation ullamco laboris
nisi ut aliquip ex ea commodo consequat. Duis aute
irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur
&n
相关文档:
IE8 自动在兼容模式下运行:
加入这么一行 <meta http-equiv="x-ua-compatible" content="ie=7" />
其内容随著指定的页面模式而更改,当要模拟IE7时,指定IE=IE7,也可以指定IE=6来模仿IE6
区别IE6与FF:
background:orange;*background:blue;
区别IE6与IE7:
background:green !important;background:blue;
......
1. 检查HTML元素是否有拼写错误、是否忘记结束标记
即使是老手也经常会弄错div的嵌套关系。可以用dreamweaver的验证功能检查一下有无错误。
2. 检查CSS是否正确
检查一下有无拼写错误、是否忘记结尾的 } 等。可以利用CleanCSS来检查 CSS的拼写错误。CleanCSS本是为CSS减肥的
工具,但也能检查出拼写错误。
3. 确定错误 ......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<TITLE>无刷新变换样式表</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /& ......
1.position的absolute属性表示该块已经完全脱离文本流了。也就是不再占用空间位置
。完全靠top,button,right,left来进行定位。
这个必须能够完全理解。同时为减少错误在设置absolute后,一定至少指定top,buttom,right,left中的一个。
2.如果块设置了absolute属性,其定位的原点和父块的position有关。
如果父块设置 ......