..新手想弄圆角矩形边框。。但是后面有两个position:absolute失效了。。不知道为什么。求帮助
时间:2011-07-29
来源:互联网
代码如下。。有好多是注释掉的。。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "html://www.w3.org/TR/xhtml1/DTD/xhtml-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="tent/html;
charset=gb2312"/>
<title>手写注册页</title>
<style>
li{
float:left;
/*margin-left:100px;*/
/*text-align:left;*/
/*position: absolute;*/
}
div{
height:300px;
width:400px;
background-color:#ccc;
/*text-align:left;*/
/*background-image:url(ssss.JPG);*/
background-repeat:no-repeat;
/*margin:10px;*/
/*padding-right:200px;*/
position:relative;
}
.zshang{
background-image:url(ssss.JPG);
background-position:right top;
right:-1px;
top:-1px;
/*padding-top:80px;*/
position:absolute;
}
.yshang{
background-image:url(ssss.JPG);
background-position:left top;
top:1px;
left:1px;
/*padding-top:80px;*/
position:absolute;
}
.zxia{
background-image:url(ssss.JPG);
background-position:right bottom;
right:-1px;
bottom:-1px;
position:absolute;
}
.yxia{
background-image:url(ssss.JPG);
background-position:left bottom;
left:1px;
bottom:1px;
position:absolute;
{
#jzhong{
background-image:url(ssss.JPG);
background-position:right top;
right:30px;
top:30px;
/*background-repeat:repeat-y;*/
position:absolute;
}
#xzhong{
background-image:url(ssss.JPG);
background-position:left bottom;
left:30px;
top:30px;
/*background-repeat:repeat-x;*/
position:absolute;
}
</style>
</head>
<body>
<div>
<ul>
<li class="zshang">11</li>
<li class="yshang">22</li>
<li>3</li>
</ul><br/>
<ul>
<li id="jzhong">4</li>
<li id="xzhong">5</li>
<li>6</li>
</ul><br/>
<ul>
<li class="zxia">77</li>
<li class="yxia">88</li>
<li>9</li>
</ul><br/>
</div>
</body>
</html>
我的想法是。将3和9分别放到右上。和左下。然后平铺。行程一条直线。。但是不知道为什么。。3和9.无法调整位置了。。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "html://www.w3.org/TR/xhtml1/DTD/xhtml-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="tent/html;
charset=gb2312"/>
<title>手写注册页</title>
<style>
li{
float:left;
/*margin-left:100px;*/
/*text-align:left;*/
/*position: absolute;*/
}
div{
height:300px;
width:400px;
background-color:#ccc;
/*text-align:left;*/
/*background-image:url(ssss.JPG);*/
background-repeat:no-repeat;
/*margin:10px;*/
/*padding-right:200px;*/
position:relative;
}
.zshang{
background-image:url(ssss.JPG);
background-position:right top;
right:-1px;
top:-1px;
/*padding-top:80px;*/
position:absolute;
}
.yshang{
background-image:url(ssss.JPG);
background-position:left top;
top:1px;
left:1px;
/*padding-top:80px;*/
position:absolute;
}
.zxia{
background-image:url(ssss.JPG);
background-position:right bottom;
right:-1px;
bottom:-1px;
position:absolute;
}
.yxia{
background-image:url(ssss.JPG);
background-position:left bottom;
left:1px;
bottom:1px;
position:absolute;
{
#jzhong{
background-image:url(ssss.JPG);
background-position:right top;
right:30px;
top:30px;
/*background-repeat:repeat-y;*/
position:absolute;
}
#xzhong{
background-image:url(ssss.JPG);
background-position:left bottom;
left:30px;
top:30px;
/*background-repeat:repeat-x;*/
position:absolute;
}
</style>
</head>
<body>
<div>
<ul>
<li class="zshang">11</li>
<li class="yshang">22</li>
<li>3</li>
</ul><br/>
<ul>
<li id="jzhong">4</li>
<li id="xzhong">5</li>
<li>6</li>
</ul><br/>
<ul>
<li class="zxia">77</li>
<li class="yxia">88</li>
<li>9</li>
</ul><br/>
</div>
</body>
</html>
我的想法是。将3和9分别放到右上。和左下。然后平铺。行程一条直线。。但是不知道为什么。。3和9.无法调整位置了。。
作者: bin357586905 发布时间: 2011-07-29
看看这个代码是否可以:
<html>
<head>
<title>用css做带圆角的边框</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<meta name="generator" content="HAPedit 3.1">
<style type="text/css">
body{padding: 20px;background-color: #FFF;
font: 100.01% "Trebuchet MS",Verdana,Arial,sans-serif}
h1,h2,p{margin: 0 10px}
h1{font-size: 250%;color: #FFF}
h2{font-size: 200%;color: #f0f0f0}
p{padding-bottom:1em}
h2{padding-top: 0.3em}
div#nifty{ margin: 0 10%;background: #9BD1FA}
b.rtop, b.rbottom{display:block;background: #FFF}
b.rtop b, b.rbottom b{display:block;height: 1px;
overflow: hidden; background: #9BD1FA}
b.r1{margin: 0 5px}
b.r2{margin: 0 3px}
b.r3{margin: 0 2px}
b.rtop b.r4, b.rbottom b.r4{margin: 0 1px;height: 2px}
</style>
</head>
<body>
<div id="nifty">
<b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b
class="r4"></b></b>
<h1>看看是圆角了吧</h1>
<b class="rbottom"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b
class="r1"></b></b>
</div>
</body>
</html>
<html>
<head>
<title>用css做带圆角的边框</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<meta name="generator" content="HAPedit 3.1">
<style type="text/css">
body{padding: 20px;background-color: #FFF;
font: 100.01% "Trebuchet MS",Verdana,Arial,sans-serif}
h1,h2,p{margin: 0 10px}
h1{font-size: 250%;color: #FFF}
h2{font-size: 200%;color: #f0f0f0}
p{padding-bottom:1em}
h2{padding-top: 0.3em}
div#nifty{ margin: 0 10%;background: #9BD1FA}
b.rtop, b.rbottom{display:block;background: #FFF}
b.rtop b, b.rbottom b{display:block;height: 1px;
overflow: hidden; background: #9BD1FA}
b.r1{margin: 0 5px}
b.r2{margin: 0 3px}
b.r3{margin: 0 2px}
b.rtop b.r4, b.rbottom b.r4{margin: 0 1px;height: 2px}
</style>
</head>
<body>
<div id="nifty">
<b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b
class="r4"></b></b>
<h1>看看是圆角了吧</h1>
<b class="rbottom"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b
class="r1"></b></b>
</div>
</body>
</html>
作者: yuejingjiahong 发布时间: 2011-08-09
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28