首页>>学生风采>>河南经贸职业学院孙丽超>>观点>>设置轮廓的颜色和宽度

设置轮廓的颜色和宽度

作者:孙丽超
日期:2012/11/26 13:57:08

设置轮廓的颜色:

<html>
<head>
<style type="text/css">
p {font:30px;
border:red solid thin;
outline-style:dotted;
outline-color:#00ff00;}
</style>
</head> 

<body>
<p><b>注释:</b>只有在规定了 !DOCTYPE 时,Internet Explorer 8 (以及更高版本) 才支持 outline-color 属性。</p>
</body>
</html>

设置轮廓的宽度:

<html>
<head>
<style type="text/css">
p.one{font:30px;
border:red solid thin;
outline-style:solid;
outline-width:thin;}
p.two{
border:red solid thin;
outline-style:dotted;
outline-width:3px;}
</style>
</head>
<body>

<p class="one">This is some text in a paragraph.</p>
<p class="two">This is some text in a paragraph.</p>

<p><b>注释:</b>只有在规定了 !DOCTYPE 时,Internet Explorer 8 (以及更高版本) 才支持 outline-width 属性。</p>
</body>
</html>

分享