
我需要它们是各种颜色(在不同的背景上),这就是我要问的原因.我不介意做不同的颜色或只是使用RGBA值.按钮总是比背景稍暗.
谢谢你的时间!
解决方法 实现这一目标的简单方法是应用多个框阴影:a{ background: #ccc; display: block; Box-shadow: #000 1px 1px 0,#000 2px 2px 0,#000 3px 3px 0,#000 4px 4px 0,#000 5px 5px 0,#000 6px 6px 0,#000 7px 7px 0,#000 8px 8px 0;} 另一种方法,使用伪元素的偏斜:
a{ background: #ccc; display: block; position: relative; }b::before,b::after{ content: ''; position: absolute; top: 5px; /* half of the shadow wIDth */ right: -10px; /* negative shadow wIDth */ wIDth: 10px; height: 100%; background: #000; transform: skewY(45deg); }b::after{ height: 10px; wIDth: 100%; bottom: -10px; /* negative shadow height */ left: 5px; /* half of the shadow height */ top: auto; right: auto; transform: skewX(45deg); } http://jsfiddle.net/b2YpR/2/
总结以上是内存溢出为你收集整理的html – 带角度角的3D CSS按钮全部内容,希望文章能够帮你解决html – 带角度角的3D CSS按钮所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)