CSS border shorthand when each border has a different width

流过昼夜 提交于 2019-12-23 08:47:20

问题


Hi,

what is the shorthand for border when borders have different width?

I tried this:

border:1px solid black, 2px solid black, 3px solid black, 4px solid black;

and this:

 border:1px 2px 3px 4px, solid, solid, solid, solid, black, black, black, black;

but none of them work.

Thank you.


回答1:


Use

border: solid black;
border-width: 1px 2px 3px 4px;


来源:https://stackoverflow.com/questions/37437141/css-border-shorthand-when-each-border-has-a-different-width

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!