当前第2页 返回上一页
以下代码直接可用,tootip的样式可以自己调试。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | <!DOCTYPE html>
< html >
< head >
< meta charset = "UTF-8" >
< title >Document</ title >
< style >
*{
margin: 0;
padding: 0;
}
.box {
display: flex;
justify-content: center;
align-items: center;
}
span {
position: relative;
margin: 50px auto;
border: 1px solid;
}
span[aria-label]:hover:after {
content: attr(aria-label);
position: absolute;
bottom: -30px;
left: 0;
border: 1px solid;
width: 100%;
}
</ style >
</ head >
< body >
< div class = "box" >
< span aria-label = "我是tooltip" >我是主体内容啊</ span >
</ div >
</ body >
</ html >
|
更多编程相关知识,请访问:编程教学!!
以上就是css如何修改html标签的title样式?(代码示例)的详细内容,更多文章请关注木庄网络博客!
返回前面的内容
相关阅读 >>
css outline-style属性怎么用
css 背景不滚动的实现方法
css中背景图片有哪些属性
css中哪些属性可以继承
css怎么使用display显示隐藏元素
css grid布局是什么?grid布局的基本介绍
css中元素的浮动用什么属性
css如何让a标签不可点击
css鼠标样式
纯css实现图片左右翻转效果(附代码)
更多相关阅读请进入《css》频道 >>
人民邮电出版社
本书对 Vue.js 3 技术细节的分析非常可靠,对于需要深入理解 Vue.js 3 的用户会有很大的帮助。——尤雨溪,Vue.js作者
转载请注明出处:木庄网络博客 » css如何修改html标签的title样式?(代码示例)