{background:0;}有效的CSS吗? [英] Is {background:0;} valid CSS?

查看:129
本文介绍了{background:0;}有效的CSS吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道background是速记属性-值0对所有属性有什么作用,并且它是有效的CSS吗?

I understand that background is the shorthand property - what will the value 0 do to all of the properties and is it valid CSS?

selector {background:0;}

推荐答案

background:0是有效的CSS,并编译为:

background:0 is valid css and gets compiled into:

background-image: initial;
background-position-x: 0px;
background-position-y: 50%;
background-size: initial;
background-repeat-x: initial;
background-repeat-y: initial;
background-attachment: initial;
background-origin: initial;
background-clip: initial;
background-color: initial;

这篇关于{background:0;}有效的CSS吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆