Disable or reset a CSS rule
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
精彩评论