Home  >  Article  >  Web Front-end  >  请问:CSS中border属性的问题_html/css_WEB-ITnose

请问:CSS中border属性的问题_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:47:27971browse

我看到一个CSS文件这样写:
html, body{
background: transparent;   
border: 0;
margin: 0;
padding: 0;
vertical-align: baseline;
}
可是我看书上说background后面要写背景颜色 | 背景图案 | 背景重复 | 背景附件 | 背景位置
border后面也要写几个属性的值,为什么这里指写一个?如果写一个,它代表是哪个


回复讨论(解决方案)

background: transparent;是透明的意思
background:只写一个,其他的是默认的
比如background:#ccc; 实际上和backgroud:#ccc repeat 0 0 一个效果  
border也是一个道理 不写就是风格和颜色默认

background:只写一个,其他的是默认的
==============================
因为没有background这个属性,只有background-image,background-color,
background-repeat,background-position等
你们只写一个,那这一个到底是哪一个属性呢?
还有font只写一个,你们是哪一个属性呢?
另:是不是相关的属性都可以只写一个呢?
那如何知道这一个是哪个属性呢?

表示上右下左都为0

Statement:
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