开发者

Disable or reset a CSS rule

开发者 https://www.devze.com 2023-01-29 09:57 出处:网络
If define a CSS rule with top: 0;, how can I later disable or neutral开发者_运维技巧ise it in favor of bottom: 0; used elsewhere?do top: auto; bottom:0; - auto is the default value for toptop: auto;

If define a CSS rule with top: 0;, how can I later disable or neutral开发者_运维技巧ise it in favor of bottom: 0; used elsewhere?


do top: auto; bottom:0; - auto is the default value for top


top: auto;
bottom: 0px;


if you have the stretch issue just use initial to reset the rule

top: initial;

or

bottom: initial;


CSS is cascading, so for example, if you put p { top: 0;) first and p.bottom {top:auto; bottom: 0;) after that, your css will listen to the latter for p.bottom

0

精彩评论

暂无评论...
验证码 换一张
取 消