html圆圈里面问号,html,css实现问号提示信息

问题:如何使用html,css实现问号提示信息?不使用js

解决:使用hint.css或自己写

方法:

方法一:使用hint.css

http://kushagragour.in/lab/hint/

方法二:

This is the inline help tip! You can explain to your users what this section of your web app is about.

此代码共3种演示效果,请点击上面的按钮进行切换。

鼠标移到右侧的“?”问号上查看效果。

css:#content{

background-color: #FFF;

border-radius: 4px;

padding: 40px;

margin: 0 auto;

max-width: 600px;

position: relative;

margin: 0 auto 100px;

}

.help-tip{

position: absolute;

top: 18px;

right: 18px;

text-align: center;

background-color: #BCDBEA;

border-radius: 50%;

width: 24px;

height: 24px;

font-size: 14px;

line-height: 26px;

cursor: default;

}

.help-tip:before{

content:'?';

font-weight: bold;

color:#fff;

}

.help-tip:hover p{

display:block;

transform-origin: 100% 0%;

-webkit-animation: fadeIn 0.3s ease-in-out;

animation: fadeIn 0.3s ease-in-out;

}

.help-tip p{

display: none;

text-align: left;

background-color: #1E2021;

padding: 20px;

width: 300px;

position: absolute;

border-radius: 3px;

box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);

right: -4px;

color: #FFF;

font-size: 13px;

line-height: 1.4;

}

.help-tip p:before{

position: absolute;

content: '';

width:0;

height: 0;

border:6px solid transparent;

border-bottom-color:#1E2021;

right:10px;

top:-12px;

}

.help-tip p:after{

width:100%;

height:40px;

content:'';

position: absolute;

top:-40px;

left:0;

}

参考:http://sc.chinaz.com/jiaobendemo.aspx?downloadid=1481591154771

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值