html虚线密度如何调整

html-css014

html虚线密度如何调整,第1张

order-width规定边框的宽度。

border-style规定边框的样式。

border-color规定边框的颜色。

inherit规定应该从父元素继承 border 属性的设置。

borderWidth设置边框的宽度。

thin

medium

thick

length

borderStyle设置边框的样式。

none

hidden

dotted

dashed

solid

double

groove

ridge

inset

outset

borderColor设置边框的颜色。

color-name

color-rgb

color-hex

transparent

需要准备的材料分别有:电脑、浏览器、html编辑器。

1、首先,打开html编辑器,新建html文件,例如:index.html。

2、在index.html中的<style>标签中,输入css代码:div {height:60pxborder-bottom:1px dashed}。

3、浏览器运行index.html页面,此时通过css定义了一个水平的虚线。

<!DOCTYPE HTML>

<html>

<meta charset="UTF-8" />

<head>

<title></title>

</head>

<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>

<style type="text/css">

*{

margin: 0

padding: 0

}

.box {width: 100%border: 1px solid #000000box-sizing: border-boxposition: relative}

.img1{height: 100%width: 100%}

li{list-style: none}

.box li{border-bottom: 1px dashed #000000width: 80%background: #DCDCDCheight: 35px}/*dashed是虚线width控制li的宽度*/

.text{position: absolutetop:42.5pxleft:30%}

.text20{position: absolutetop:42.5pxright:20px}

</style>

<body>

<div class="demo">

<div class="box" style="">

<ul>

<li>内容1</li>

<li>内容2</li>

<li>内容3</li>

</ul>

<div class="text">

灰色内容占总宽度80%

</div>

<div class="text20">

白色内容占</br>总宽度20%

</div>

</div>

</div>

</body>

</html>