我可以立即在CSS中设置所有偏移边? [英] Can I set all offset sides in CSS at once?

查看:99
本文介绍了我可以立即在CSS中设置所有偏移边?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

而不是:

  right:0px; 
left:0px;
top:0px;
bottom:0px;

我可以这样吗?

  sides:0px; 


解决方案

没有,不存在的简写 sides 属性设置偏移量。



有其他种类的属性的shorthands涉及框的两侧,例如。 margin padding border ,但不适用于positional偏移右键底部


Instead of having:

right:0px;
left:0px;
top:0px;
bottom:0px;

Can I have something like this?

sides:0px;

解决方案

No, there does not exist a shorthand sides property for setting the offsets. You have to set them all separately.

There are shorthands for other kinds of properties that involve the sides of a box, e.g. margin, padding and border, but not for the positional offsets top, right, bottom and left.

这篇关于我可以立即在CSS中设置所有偏移边?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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