Home > Web Front-end > HTML Tutorial > What is the difference between border:0 and border:none_html/css_WEB-ITnose

What is the difference between border:0 and border:none_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:41:19
Original
1460 people have browsed it

What is the difference between border:0 and border:none:
The effect of setting the border of an object to border:0 and border:none is the same. You can cancel the border. Code The example is as follows:

<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="author" content="http://www.51texiao.cn/" /><title>蚂蚁部落</title><style type="text/css">div{  width:200px;  height:200px;  border:2px solid red;  border-bottom:none;  border-left:0;}</style></head><body><div></div></body></html>
Copy after login

It can be seen from the operation of the above code that the border can be canceled by setting the border to 0 or none. From the appearance, the two are the same, but still There is a big difference. border:0 can set the width of the border to zero. Although it is not visible visually, the browser will still render it. border:none means there is no border directly and the browser will not render it. Therefore, the execution effect is slightly higher when set to none. Of course, this difference is basically negligible.

The original address is: http://www.51texiao.cn/div_cssjiaocheng/2015/0501/508.html

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template