直接切图制作这样的盒子的话可能不用花很长的时间,但是使用css3的话却是可以大大加快页面加载速度的
所以尝试了一下,当然并不是出于加载速度的考虑,纯粹的因为shoujian
TOT
html:
<div class="registerGiftBox">
<div class="registerGift">
<div class="ding ding1 wow animated" style="visibility: visible;"></div>
<div class="ding ding2 wow animated" style="visibility: visible;"></div>
<div class="ding ding3 wow animated" style="visibility: visible;"></div>
<div class="ding ding4 wow animated" style="visibility: visible;"></div>
<div class="registerGiftInner">
</div>
</div>
</div>
.registerGiftBox
{
- position: relative;
- width: 1200px;
- height: 640px;
- background-color: #d19a16;
- margin: -50px auto 0;
- border-radius: 20px;
}
registerGift
{
- position: relative;
- width: 1200px;
- height: 578px;
- background-color: #f9b615;
- border: 1px solid #f9b615;
- border-radius: 20px;
- margin: 0 auto;
}
.registerGift
{
- top: 62px;
}
.registerGiftInner
{
- width: 1152px;
- margin: 25px auto 0;
- height: 540px;
- background-color: #fff;
- border-bottom-left-radius: 20px;
- border-bottom-right-radius: 20px;
- box-shadow: inset 0 0 2px 6px #e6dfce;
}
钉子:
.registerGiftBox .ding, .vipBox .ding
{
- position: absolute;
- width: 42px;
- height: 42px;
- background: url(../images/border.png);
- animation-delay: -.4s;
}
.registerGiftBox .ding2
{
- right: 0;
}
.registerGiftBox .ding3
{
- bottom: 0;
}
.registerGiftBox .ding4{
- bottom: 0;
- right: 0;
}
父部盒子的角
.registerGiftBox:before
{
- position: absolute;
- content: '';
- width: 0;
- height: 0;
- border-width: 0 0 75px 130px;
- border-style: solid;
- border-color: transparent transparent transparent #ee6728;
}
.registerGiftBox:after
{
- position: absolute;
- content: '';
- width: 0;
- height: 0;
- border-width: 0 130px 75px 0;
- border-style: solid;
- border-color: transparent #ee6728 transparent transparent;
- top: -2px;
- right: -5px;
}
绳子是下个盒子用伪类元素实现