我是靠谱客的博主 香蕉雪碧,这篇文章主要介绍html5怎么取消边框,现在分享给大家,希望可以做个参考。

本教程操作环境:windows10系统、CSS3&&HTML5版本、Dell G3电脑。

html5怎么取消边框

border 属性在一个声明中设置所有边框属性。

语法:

复制代码
1
Object.style.border=borderWidth borderStyle borderColor
登录后复制

07.png

示例如下:

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<html> <head> <style type="text/css"> p { border: thin dotted #FF0000; } </style> <script type="text/javascript"> function changeBorder() { document.getElementById("p1").style.border="none"; } </script> </head> <body> <input type="button" onclick="changeBorder()" value="Change border" /> <p id="p1">This is a paragraph</p> </body> </html>
登录后复制

输出结果:

01.gif

示例:

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<html> <body> <table border="1"> <tr> <th>Month</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> </table> <table border="0"> <tr> <th>Month</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> </table> </body> </html>
登录后复制

输出结果:

08.png

(学习视频分享:css视频教程、html视频教程)

以上就是html5怎么取消边框的详细内容,更多请关注靠谱客其它相关文章!

最后

以上就是香蕉雪碧最近收集整理的关于html5怎么取消边框的全部内容,更多相关html5怎么取消边框内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(197)

评论列表共有 0 条评论

立即
投稿
返回
顶部