【发布时间】:2013-02-13 13:08:35
【问题描述】:
是否可以仅使用 CSS 创建以下内容?
我已经创建了容器和圆角。小提琴here.
但我不知道如何获得轻微的闪亮效果。是否可以在 CSS 中做到这一点?如果有怎么办?
下面是我目前写的代码。
HTML
<div id="phone-outer">
<div id="phone-inner">
</div>
</div>
CSS
#phone-outer {
margin-bottom:200px;
margin:0 auto;
width:400px;
height:500px;
background-color:#333;
-webkit-border-bottom-right-radius:25px;
-webkit-border-bottom-left-radius:25px;
-moz-border-radius-bottomright:25px;
-moz-border-radius-bottomleft:25px;
border-bottom-right-radius:25px;
border-bottom-left-radius:25px;
}
#phone-inner {
margin:0 auto;
background-color:#FFF;
width:360px;
height:460px;
}
【问题讨论】:
-
我在渐变方面做得不够好,无法正确回答,但您可能想尝试较大的径向渐变,使用 rgba 颜色创建半透明的白色阴影,重新定位,以便大多数其中一个在白色区域的后面。
-
谢谢。我会试一试。我对基本的 CSS 没问题,但渐变对我来说也一直是个难题。
-
还有一些灵感! tjrus.com/iphone :)