PANG
首页
学习笔记
前端技术
生活感悟
Golang
联系我
纯CSS3实现鼠标悬停提示气泡效果
前端技术
2023/09/08
CSS
<!DOCTYPE HTML> <html> <head> <title>CSS3制作鼠标悬停提示气泡内容菜单</title> <style type=\"text/css\"> body{ background:#D6D3C9; color:#383835; font-family:Arial, Arial, Helvetica, sans-serif; } #bubblemenu li { display: inline; margin-left: 15px; cursor:pointer; } #bubblemenu li > div { width: 150px; min-height: 100px; position: absolute; display: inline; margin-left: -120px; padding: 5px; visibility:hidden; opacity: 0; margin-top: -125px; background: #ffffff; font-size:1em; /* Setting the border-radius property for all Browsers */ -moz-border-radius: 5px; /* Firefox */ -webkit-border-radius: 5px; /* Safari and Chrome */ border-radius: 5px; /* Browsers that Support it like Opera */ /* Setting the box-shadow property for all Browsers */ -moz-box-shadow: 0 0 8px gray; /* Firefox */ -webkit-box-shadow: 0 0 8px gray; /* Safari and Chrome */ filter: progid:DXImageTransform.Microsoft.Shadow(color=\'#272229\', Direction=135, Strength=3); /* IE */ box-shadow: 0 0 8px gray; /* Browsers that Support it like Opera */ /* Setting the transition property for all Browsers */ -moz-transition: all 0.5s ease-in-out; /* Firefox */ -webkit-transition: all 0.5s ease-in-out; /* Safari and Chrome */ -o-transition: all 0.5s ease-in-out; /* Opera */ transition: all 0.5s ease-in-out; /* Browsers that Support it */ } #bubblemenu li:hover > div { visibility:visible; opacity: 1; margin-top: -150px; /* Setting the transition property for all Browsers */ -moz-transition: all 0.5s ease-in-out; /* Firefox */ -webkit-transition: all 0.5s ease-in-out; /* Safari and Chrome */ -o-transition: all 0.5s ease-in-out; /* Opera */ transition: all 0.5s ease-in-out; /* Browsers that Support it */ } </style> </head> <body> <h1>Coda Effect With CSS3</h1> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <ul id=\"bubblemenu\"> <li> Penn Jillett <div> My favorite thing about the Internet is that you get to go into the private world of real creeps without having to smell them. </div> </li> <li> Thomas Watson <div> I think there is a world market for maybe five computers. </div> </li> <li> Bill Gates <div> 640K ought to be enough for anybody. </div> </li> <li> Sam Ewing <div> Computers are like bikinis. They save people a lot of guesswork. </div> </li> </ul> <div style=\" color:#000;width:600px;margin:0 auto; text-align:center; font-size:12px;\"> </div></body> </html></td> </tr> </table>
提示:您可以先修改部分代码再运行
本文地址:https://www.stayed.cn/item/22802
转载请注明出处。
本站部分内容来源于网络,如侵犯到您的权益,请
联系我
微信
QQ好友
QQ空间
腾讯微博
新浪微博
人人网
我的博客
人生若只如初见,何事秋风悲画扇。
我的标签
框架(11)
jQuery(58)
WordPress(47)
Hbuilder(1)
PHP(4727)
NoSQL(3)
MYSQL(1173)
微信小程序(6)
JavaScript(8215)
HTML5(6)
前端设计(20)
网络安全(6)
微信支付(2)
连接池(1)
IOS(410)
HTML(671)
CSS(1220)
meta(1)
swiper(1)
Nginx(8)
移动端(4)
CentOS(7)
node.js(7)
windows(4)
IIS(3)
Linux(1450)
Bootstrap(1)
Rewrite(1)
Vue(81)
ThinkPHP(11)
Redis(6)
SEO(2)
Angular(3)
Android(2321)
ListView(2)
C#(1513)
Oracle(346)
MongoDB(111)
MSSQL(446)
Java(1572)
C++(863)
Golang(125)
Canal(4)
ES(2)
Kafka(2)
Prometheus(1)
.NET(1094)
SqLite(16)
AJAX(266)
Mac(499)
JSP(251)
PostgreSQL(23)
SSL(1)
JS(73)
Laravel(18)
安全(1)
C#.Net(2)
ES6(28)
Excel(40)
Word(53)
PHP8(2)
GIT(6)
VSCode(6)
Python(5)
React(31)
phpstorm(4)
Node(6)
前端问答(12)
windows运维(1)
phpMyAdmin(3)
SQL(1)
Access(1)
Java基础(1)
Discuz(3)
帝国CMS(10)
ECShop(5)
DEDECMS(34)
PHPCMS(5)
YII(1)
Docker(1)
composer(1)
数字人技术(2)
随笔档案
2024-02(2)
2023-06(1)
2023-05(1)
2023-04(14)
2023-03(3)
2023-01(6)
2022-12(5)
2022-11(5)
2022-07(2)
2022-06(4)
2022-05(3)
2022-03(1)
2021-12(6)
2021-11(1)
2021-10(3)
2021-09(5)
2021-07(5)
2021-02(2)
2021-01(7)
2020-12(18)
2020-11(14)
2020-10(12)
2020-09(10)
2020-08(22)
2020-07(2)
2020-06(1)
2020-04(5)
2020-03(9)
2020-02(7)
2020-01(9)
2019-12(8)
2019-11(10)
2019-10(11)
2019-09(17)
2019-08(16)
2019-07(6)
2019-06(3)
2019-04(1)
2019-03(8)
2019-02(5)
2019-01(1)
2018-11(2)
2018-10(3)
2018-09(1)
2018-08(3)
2018-07(3)
2018-06(7)
2018-04(4)
2018-03(5)
2018-02(4)
2018-01(22)
2017-12(3)
2017-11(5)
2017-10(15)
2017-09(26)
2017-08(1)
2017-07(3)