css斜角覆盖阴影
?
Demo下載??效果如圖:
css:
??? #box {
?? ??? ?width: 280px;
?? ??? ?height: 150px;
?? ??? ?background: #ff6565;
?? ??? ?padding: 20px;
?? ??? ?position: relative;
?? ??? ?overflow: hidden;
?? ?}
?? ?#content {
?? ??? ?width: 280px;
?? ??? ?height: 150px;
?? ??? ?background: #ffe765;
?? ?}
?? ?#shadow {
?? ??? ?width: 63px;
?? ??? ?height: 63px;
?? ??? ?position: absolute;
?? ??? ?transform: rotate(-45deg);
?? ??? ?top: -20px;
?? ??? ?left: -20px;
?? ??? ?background: url(shadow.png) no-repeat center bottom;
?? ?}
?? ?#shadow div {
?? ??? ?width: 63px;
?? ??? ?height: 60px;
?? ??? ?background: #ff6565;
?? ?}
html:
??? <div id="box">
?? ??? ?<div id="shadow"><div></div></div>
?? ??? ?<div id="content"></div>
?? ?</div>
?
轉載于:https://www.cnblogs.com/k13web/p/4139910.html
總結
- 上一篇: MYSQL的空间查询(转帖)
- 下一篇: ViewPager循环