虚线 代码
<DIV
style="BORDER-RIGHT: #000 1px solid; PADDING-RIGHT: 20px; BORDER-TOP: #000 1px dotted;
PADDING-LEFT: 20px; PADDING-BOTTOM: 20px; MARGIN: 80px auto; BORDER-LEFT: #000 1px dotted;
WIDTH: 360px; PADDING-TOP: 20px; BORDER-BOTTOM: #000 1px dotted; HEIGHT: 210px">虚线 代码</DIV>
这个就是显示虚线框的代码
solid 边框由实线组成、
dotted 边框由点组成、
dash 边框由短线组成、
double 边框由双实线组成、
groove 边框带有立体感的沟槽、
ridge 边框成畸形、
inset 边框内嵌一个立方体边框、
outset 边框外嵌一个立方体--
经常可以在网页上看到很多漂亮的虚线,
今天我也研究了一下它的实现方式,
还是比较easy的现在和大家共享一下。
水平虚线的代码: <td height="1"><div style="border-top:1px dashed #cccccc;height: 1px;overflow:hidden"/></td>
垂直虚线的代码: <td height="214" style="border-right: 1px dashed #CCCCCC; " > </td>
如何用css画虚线
css样式:
1
.line {
margin-top: 1px;
border-top-style: dashed;
border-top-color: #CCCCCC;
}
2
.line {
border-top: 1px dashed #CCCCCC;
}
css画虚线
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>www.webjx.com</title>
<style type="text/css">
<!--
#aaa {border-top:1px dashed #cccccc;height: 1px;overflow:hidden;}
-->
</style>
</head>
<body>
<div id="aaa"></div>
</body>
</html>