Css3 提示框

<div class="arrow_box"><span>xxy is a so cool boy</span></div>

css:

 1         div{
 2             width: 200px;
 3             height: 100px;
 4             margin-top: 100px;
 5             text-align: center;
 6         }
 7         div span{
 8             text-align: center;
 9             vertical-align: -34px;
10             color: #5dff63;
11         }
12 
13         .arrow_box {
14             position: relative;
15             background: #88b7d5;
16             border: 4px solid #c2e1f5;
17         }
18 
19         .arrow_box:after, .arrow_box:before {
20             bottom: 100%;
21             left: 50%;
22             border: solid transparent;
23             content: " ";
24             height: 0;
25             width: 0;
26             position: absolute;
27             pointer-events: none;
28         }
29 
30         .arrow_box:after {
31             border-color: rgba(136, 183, 213, 0);
32             border-bottom-color: #88b7d5;
33             border-width: 30px;
34             margin-left: -30px;
35         }
36 
37         .arrow_box:before {
38             border-color: rgba(194, 225, 245, 0);
39             border-bottom-color: #c2e1f5;
40             border-width: 36px;
41             margin-left: -36px;
42         }

图:

 

关于伪元素的使用是一门技巧。自己研究吧,哈哈哈哈!!!!

转载于:https://www.cnblogs.com/xinxingyu/p/4770770.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值