当前位置:秒懂库 > 综合知识 > css边框线怎么连着写,css填充边线怎么写代码
手机版

css边框线怎么连着写,css填充边线怎么写代码

来源:秒懂库 阅读:2.53W 次
1.css填充边线怎么写代码

你只是要边框跟随内容自动适应的是吧?还是需要那个加大的功能?

css边框线怎么连着写 css填充边线怎么写代码

如果是前者的话,你需要把内容框分成三部分;

例如:

<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://www.miaodongku.com/zonghezhishi/4on26v.html

Copyright © 2024. 秒懂库 All right reserved. 黑ICP备20202358号-2

文字美图素材,版权属于原作者。部分文章内容由网友提供推送时因种种原因未能与原作者联系上,若涉及版权问题,敬请原作者联系我们,立即处理。