gpt4 book ai didi

html - Page curl 阴影也在顶部?

转载 作者:行者123 更新时间:2023-11-28 13:18:59 25 4
gpt4 key购买 nike

引用css效果来自:Best way to do this kind of drop shadow?

如何(如果有的话)也可以在图像顶部应用相同的效果?

最佳答案

尝试

http://jsfiddle.net/mPnTP/433/

body {
padding:20px 0 30px;
font:14px/1.5 Arial, sans-serif;
text-align:center;
color:#333;
background:#FAF0D9;
}

.drop-shadow {
position:relative;
float:left;
width:40%;
padding:1em;
margin:2em 10px 4em;
background:#fff;
-webkit-box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
-moz-box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
}

.drop-shadow:before,
.drop-shadow:after {
content:"";
position:absolute;
z-index:-2;
}

.drop-shadow p {
font-size:16px;
font-weight:bold;
}

/* Lifted corners */

.lifted {
-moz-border-radius:4px;
border-radius:4px;
}

.lifted:before,
.lifted:after {
top:15px;
left:10px;
width:50%;
height:20%;
max-width:300px;
-webkit-box-shadow:0 -15px 10px rgba(0, 0, 0, 0.7);
-moz-box-shadow:0 -15px 10px rgba(0, 0, 0, 0.7);
box-shadow:0 -15px 10px rgba(0, 0, 0, 0.7);
-webkit-transform:rotate(3deg);
-moz-transform:rotate(3deg);
-ms-transform:rotate(3deg);
-o-transform:rotate(3deg);
transform:rotate(3deg);

}

.lifted:after {
right:10px;
left:auto;
-webkit-transform:rotate(-3deg);
-moz-transform:rotate(-3deg);
-ms-transform:rotate(-3deg);
-o-transform:rotate(-3deg);
transform:rotate(-3deg);
}


<div class="drop-shadow lifted">
<p>Lifted corners</p>
</div>

关于html - Page curl 阴影也在顶部?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16397513/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com