css边框线怎么连着写 css填充边线怎么写代码
- 综合知识
- 关注:2.6W次
你只是要边框跟随内容自动适应的是吧?还是需要那个加大的功能?
如果是前者的话,你需要把内容框分成三部分;
例如:
<div id="head"></div>
<div id="content"></div>
<div id="footer"></div>
然后CSS部分就是:
#head {
height:**px;
width:**px;
background:/img/1.jpg no-repeat;
}
#content {
height:**px;
background:/img/3.jpg repeat-y; /改处就是上图我用红框框的盒子2的部分,让它X轴重复;
}
#footer {
height:**px;
width:**px;
background:/img/3.jpg no-repeat;
}
2.css三角形边框怎么制作拼接在一起的1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "1/DTD/xhtml1-transitional.dtd">
<htmlxmlns="">
<head>
<meta; charset=utf-8"/>
<title>;无标题文档</title>
<style>
.border{
position:relative;
}
.border:after,.border:before{
content:'';
display:block;
position:absolute;
border-style:solid;
border-width:20px;
}
.border:before{
border-color:transparent transparent #333 transparent;
left:20px;
top:42px;
}
.border:after{
border-color:transparent transparent #fff transparent;
left:20px;
top:45px
}
</style>
</head>
<body>
<divclass="border"></div>
</body>
</html>
你自己把他定位上去,并覆盖在上面。
- 文章版权属于文章作者所有,转载请注明 https://dongkepu.com/zonghezhishi/zj7yg0.html