outline 属性在一个声明中设置所有轮廓属性。
</>code
- Object.style.outline = outlineWidth outlineStyle outlineColor
值 | 描述 | 值 |
---|---|---|
outlineWidth | 设置轮廓的宽度。 |
|
outlineStyle | 设置轮廓的样式。 |
|
outlineColor | 设置轮廓的颜色。 |
|
下面的例子改变段落周围的轮廓:
</>code
- <html>
- <head>
- <style type="text/css">
- p
- {
- border: thin solid #00FF00;
- outline: thick solid #FF0000;
- }
- </style>
- <script type="text/javascript">
- function changeOutline()
- {
document.getElementById("p1").style.outline="thin dotted #0000FF";
- }
- </script>
- </head>
- <body>
- <input type="button" onclick="changeOutline()"
- value="Change outline" />
- <p id="p1">This is a paragraph</p>
- </body>
- </html>
如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛
Powered by 365建站网 RSS地图 HTML地图
copyright © 2013-2024 版权所有 鄂ICP备17013400号