| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344 |
- <!Doctype html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <meta property="qc:admins" content="465267610762567726375" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <title>CSS 提示工具(Tooltip) | 菜鸟教程</title>
- <link rel='dns-prefetch' href='//s.w.org' />
- <link rel="canonical" href="http://www.runoob.com/css/css-tooltip.html" />
- <meta name="keywords" content="CSS 提示工具(Tooltip)">
- <meta name="description" content="CSS 提示工具(Tooltip) 本文我们为大家介绍如何使用 HTML 与 CSS 来创建提示工具。 提示工具在鼠标移动到指定元素后触发,先看以下四个实例: .tooltip { position: relative; display: inline-block; border-bottom: 1px dotted #ccc; zcursor: help; color: #006080; ..">
-
- <link rel="shortcut icon" href="//static.runoob.com/images/favicon.ico" mce_href="//static.runoob.com/images/favicon.ico" type="image/x-icon" >
- <link rel="stylesheet" href="/wp-content/themes/runoob/style.css?v=1.12" type="text/css" media="all" />
- <link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" media="all" />
- <!--[if gte IE 9]><!-->
- <script src="//cdn.bootcss.com/jquery/2.0.3/jquery.min.js"></script>
- <!--<![endif]-->
- <!--[if lt IE 9]>
- <script src="//cdn.bootcss.com/jquery/1.9.1/jquery.min.js"></script>
- <script src="//cdn.bootcss.com/html5shiv/r29/html5.min.js"></script>
- <![endif]-->
- <link rel="apple-touch-icon" href="//static.runoob.com/images/icon/mobile-icon.png"/>
- <meta name="apple-mobile-web-app-title" content="菜鸟教程">
- </head>
- <body>
- <!-- 头部 -->
- <div class="container logo-search">
- <div class="col search row-search-mobile">
- <form action="index.php">
- <input class="placeholder" value="搜索……" name="s" autocomplete="off">
- </form>
- </div>
- <div class="row">
- <div class="col logo">
- <h1><a href="/">菜鸟教程 -- 学的不仅是技术,更是梦想!</a></h1>
- </div>
- <div class="col right-list">
- <button class="btn btn-responsive-nav btn-inverse" data-toggle="collapse" data-target=".nav-main-collapse" id="pull" style=""> <i class="fa fa-navicon"></i> </button>
- </div>
- <div class="col search search-desktop last">
- <form action="//www.runoob.com/" target="_blank">
- <input class="placeholder" id="s" name="s" value="搜索……" autocomplete="off">
- </form>
- </div>
- </div>
- </div>
- <!-- 导航栏 -->
- <!-- 导航栏 -->
- <div class="container navigation">
- <div class="row">
- <div class="col nav">
- <ul class="pc-nav">
- <li><a href="//www.runoob.com/">首页</a></li>
- <li><a href="/html/html-tutorial.html">HTML</a></li>
- <li><a href="/css/css-tutorial.html">CSS</a></li>
- <li><a href="/js/js-tutorial.html">JavaScript</a></li>
- <li><a href="/jquery/jquery-tutorial.html">jQuery</a></li>
- <li><a href="/bootstrap/bootstrap-tutorial.html">Bootstrap</a></li>
- <li><a href="/sql/sql-tutorial.html">SQL</a></li>
- <li><a href="/mysql/mysql-tutorial.html">MySQL</a></li>
- <li><a href="/php/php-tutorial.html">PHP</a></li>
- <li><a href="/python/python-tutorial.html">Python2</a></li>
- <li><a href="/python3/python3-tutorial.html">Python3</a></li>
- <li><a href="/cprogramming/c-tutorial.html">C</a></li>
- <li><a href="/cplusplus/cpp-tutorial.html">C++</a></li>
- <li><a href="/csharp/csharp-tutorial.html">C#</a></li>
- <li><a href="/java/java-tutorial.html">Java</a></li>
- <li><a href="/sitemap">更多……</a></li>
- <!--
- <li><a href="javascript:;" class="runoob-pop">登录</a></li>
- -->
- </ul>
- <ul class="mobile-nav">
- <li><a href="//www.runoob.com/">首页</a></li>
- <li><a href="/html/html-tutorial.html">HTML</a></li>
- <li><a href="/css/css-tutorial.html">CSS</a></li>
- <li><a href="/js/js-tutorial.html">JavaScript</a></li>
- <a href="javascript:void(0)" class="search-reveal">Search</a>
- </ul>
-
- </div>
- </div>
- </div><!-- 内容 -->
- <div class="container main">
- <!-- 中间 -->
- <div class="row">
-
- <div class="col left-column">
- <div class="tab">CSS 教程 <a data-cate="5" href="javascript:void(0);" title="夜间模式" id="moon"><i class="fa fa-moon-o" aria-hidden="true" style="font-size: 1.4em;float: right;margin: 4px 6px 0;"></i></a>
- <a data-cate="5" style="display:none;" href="javascript:void(0);" title="日间模式" id="sun" ><i class="fa fa-sun-o" aria-hidden="true" style="font-size: 1.4em;float: right;margin: 4px 6px 0;"></i></a>
- </div>
- <div class="sidebar-box gallery-list">
- <div class="design" id="leftcolumn">
- <a target="_top" title="CSS 教程" href="/css/css-tutorial.html" >
- CSS 教程 </a>
- <a target="_top" title="CSS 简介" href="/css/css-intro.html" >
- CSS 简介 </a>
- <a target="_top" title="CSS 语法" href="/css/css-syntax.html" >
- CSS 语法 </a>
- <a target="_top" title="CSS Id 和 Class选择器" href="/css/css-id-class.html" >
- CSS Id 和 Class选择器 </a>
- <a target="_top" title="CSS 创建" href="/css/css-howto.html" >
- CSS 创建 </a>
- <a target="_top" title="CSS Backgrounds(背景)" href="/css/css-background.html" >
- CSS Backgrounds(背景) </a>
- <a target="_top" title="CSS Text(文本)" href="/css/css-text.html" >
- CSS Text(文本) </a>
- <a target="_top" title="CSS Fonts(字体)" href="/css/css-font.html" >
- CSS Fonts(字体) </a>
- <a target="_top" title="CSS 链接(link)" href="/css/css-link.html" >
- CSS 链接(link) </a>
- <a target="_top" title="CSS 列表样式(ul)" href="/css/css-list.html" >
- CSS 列表样式(ul) </a>
- <a target="_top" title="CSS Table(表格)" href="/css/css-table.html" >
- CSS Table(表格) </a>
- <a target="_top" title="CSS 盒子模型" href="/css/css-boxmodel.html" >
- CSS 盒子模型 </a>
- <a target="_top" title="CSS Border(边框)" href="/css/css-border.html" >
- CSS Border(边框) </a>
- <a target="_top" title="CSS 轮廓(outline)属性" href="/css/css-outline.html" >
- CSS 轮廓(outline)属性 </a>
- <a target="_top" title="CSS Margin(外边距)" href="/css/css-margin.html" >
- CSS Margin(外边距) </a>
- <a target="_top" title="CSS Padding(填充)" href="/css/css-padding.html" >
- CSS Padding(填充) </a>
- <a target="_top" title="CSS 分组和嵌套" href="/css/css-grouping-nesting.html" >
- CSS 分组和嵌套 </a>
- <a target="_top" title="CSS 尺寸 (Dimension)" href="/css/css-dimension.html" >
- CSS 尺寸 (Dimension) </a>
- <a target="_top" title="CSS Display(显示) 与 Visibility(可见性)" href="/css/css-display-visibility.html" >
- CSS Display(显示) </a>
- <a target="_top" title="CSS Positioning(定位)" href="/css/css-positioning.html" >
- CSS Positioning(定位) </a>
- <a target="_top" title="CSS Float(浮动)" href="/css/css-float.html" >
- CSS Float(浮动) </a>
- <a target="_top" title="CSS 布局 – 水平 & 垂直对齐" href="/css/css-align.html" >
- CSS 对齐 </a>
- <a target="_top" href="css-combinators.html">
- CSS 组合选择符 </a> <a target="_top" title="CSS 伪类" href="/css/css-pseudo-classes.html" >
- CSS 伪类 </a>
- <a target="_top" title="CSS 伪元素" href="/css/css-pseudo-elements.html" >
- CSS 伪元素 </a>
- <a target="_top" title="CSS 导航栏" href="/css/css-navbar.html" >
- CSS 导航栏 </a>
- <a target="_top" title="CSS 下拉菜单" href="css-dropdowns.html"> CSS 下拉菜单 </a>
- <a target="_top" title="CSS 提示工具(Tooltip)" href="css-tooltip.html"> CSS 提示工具</a> <a target="_top" title="CSS 图片廊" href="/css/css-image-gallery.html" >
- CSS 图片廊 </a>
- <a target="_top" title="CSS 图像透明/不透明" href="/css/css-image-transparency.html" >
- CSS 图像透明/不透明 </a>
- <a target="_top" title="CSS 图像拼合技术" href="/css/css-image-sprites.html" >
- CSS 图像拼合技术 </a>
- <a target="_top" title="CSS 媒体类型" href="/css/css-mediatypes.html" >
- CSS 媒体类型 </a>
- <a target="_top" title="CSS 属性选择器" href="/css/css-attribute-selectors.html" >
- CSS 属性选择器 </a>
- <a target="_top" title="CSS 总结" href="/css/css-summary.html" >
- CSS 总结 </a>
- <a target="_top" title="CSS 实例" href="/css/css-examples.html" >
- CSS 实例 </a>
- <br><h2 class="left"><span class="left_h2">CSS3</span> 教程</h2>
- <a target="_top" href="/css3/css3-tutorial.html" >
- CSS3 教程 </a>
- <a target="_top" href="/css3/css3-intro.html" >
- CSS3 简介 </a>
- <a target="_top" href="/css3/css3-borders.html" >
- CSS3 边框(Borders) </a>
- <a target="_top" href="/css3/css3-backgrounds.html" >
- CSS3 背景 </a>
- <a target="_top" href="/css3/css3-gradients.html">
- CSS3 渐变 </a>
- <a target="_top" href="/css3/css3-text-effects.html" >
- CSS3 文本效果 </a>
- <a target="_top" href="/css3/css3-fonts.html" >
- CSS3 字体 </a>
- <a target="_top" href="/css3/css3-2dtransforms.html" >
- CSS3 2D 转换 </a>
- <a target="_top" href="/css3/css3-3dtransforms.html" >
- CSS3 3D 转换 </a>
- <a target="_top" href="/css3/css3-transitions.html" >
- CSS3 过渡 </a>
- <a target="_top" href="/css3/css3-animations.html" >
- CSS3 动画 </a>
- <a target="_top" href="/css3/css3-multiple-columns.html" >
- CSS3 多列 </a>
- <a target="_top" href="/css3/css3-user-interface.html" >
- CSS3 用户界面 </a>
- <br>
- <h2 class="left"><span class="left_h2">CSS</span> 响应式设计</h2>
- <a target="_top" href="/css/css-rwd-viewport.html">Viewport</a>
- <a target="_top" href="/css/css-rwd-grid.html"> 网格视图</a>
- <a target="_top" href="/css/css-rwd-mediaqueries.html">媒体查询</a>
- <a target="_top" href="/css/css-rwd-images.html">图片</a>
- <a target="_top" href="/css/css-rwd-videos.html">视频(Video)</a>
- <a target="_top" href="/css/css-rwd-frameworks.html">框架</a>
- <br>
- <h2 class="left"><span class="left_h2">CSS</span> 参考手册</h2>
- <a target="_top" href="/cssref/css-reference.html" >CSS 参考手册</a>
- <a target="_top" href="/cssref/css-selectors.html">CSS 选择器</a>
- <a target="_top" href="/cssref/css-ref-aural.html">CSS 语音参考</a>
- <a target="_top" href="/cssref/css-websafe-fonts.html">CSS Web安全字体</a>
- <a target="_top" title="CSS 动画" href="/cssref/css-animatable.html"> CSS 动画 </a>
- <a target="_top" href="/cssref/css-units.html">CSS 单位</a>
- <a target="_top" href="/cssref/css-colors.html">CSS 颜色</a>
- <a target="_top" href="/cssref/css-colors-legal.html">CSS 颜色值</a>
- <a target="_top" href="/cssref/css-colornames.html">CSS 颜色名</a>
- <a target="_top" href="/cssref/css-colorsfull.html">CSS 十六进制颜色</a>
- </div>
- </div>
- </div> <div class="col middle-column">
-
-
- <div class="article">
- <div class="article-heading-ad">
- <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
- <!-- 移动版 自动调整 -->
- <ins class="adsbygoogle"
- style="display:inline-block;min-width:300px;max-width:970px;width:100%;height:90px"
- data-ad-client="ca-pub-5751451760833794"
- data-ad-slot="1691338467"
- data-ad-format="horizontal"></ins>
- <script>
- (adsbygoogle = window.adsbygoogle || []).push({});
- </script>
- </div>
- <div class="previous-next-links">
- <div class="previous-design-link"><i style="font-size:16px;" class="fa fa-arrow-left" aria-hidden="true"></i> <a href="http://www.runoob.com/css/css-dropdowns.html" rel="prev"> CSS 下拉菜单</a> </div>
- <div class="next-design-link"></div>
- </div>
- <div class="article-body">
-
- <div class="article-intro" id="content">
-
- <h1>CSS 提示工具(Tooltip)
- </h1>
- <p>本文我们为大家介绍如何使用 HTML 与 CSS 来创建提示工具。</p>
- <p>提示工具在鼠标移动到指定元素后触发,先看以下四个实例:</p>
- <style>
- .tooltip {
- position: relative;
- display: inline-block;
- border-bottom: 1px dotted #ccc;
- zcursor: help;
- color: #006080;
- }
- .tooltip .tooltiptext {
- visibility: hidden;
- position: absolute;
- width: 120px;
- background-color: #555;
- color: #fff;
- text-align: center;
- padding: 5px 0;
- border-radius: 6px;
- z-index: 1;
- opacity: 0;
- transition: opacity .6s;
- }
- .tooltip:hover .tooltiptext {
- visibility: visible;
- opacity: 1;
- }
- .tooltip .tooltiptext2 {
- visibility: hidden;
- position: absolute;
- width: 120px;
- background-color: #555;
- color: #fff;
- text-align: center;
- padding: 5px 0;
- border-radius: 6px;
- z-index: 1;
- }
- .tooltip:hover .tooltiptext2 {
- visibility: visible;
- }
- .tooltip-right {
- top: -5px;
- left: 125%;
- }
- .tooltip-right2 {
- top: -5px;
- left: 105%;
- }
- .tooltip-right::after {
- content: "";
- position: absolute;
- top: 50%;
- right: 100%;
- margin-top: -5px;
- border-width: 5px;
- border-style: solid;
- border-color: transparent #555 transparent transparent;
- }
- .tooltip-bottom {
- top: 135%;
- left: 50%;
- margin-left: -60px;
- }
- .tooltip-bottom2 {
- top: 125%;
- left: 50%;
- margin-left: -60px;
- }
- .tooltip-bottom::after {
- content: "";
- position: absolute;
- bottom: 100%;
- left: 50%;
- margin-left: -5px;
- border-width: 5px;
- border-style: solid;
- border-color: transparent transparent #555 transparent;
- }
- .tooltip-top {
- bottom: 125%;
- left: 50%;
- margin-left: -60px;
- }
- .tooltip-top2 {
- bottom: 115%;
- left: 50%;
- margin-left: -60px;
- }
- .tooltip-top::after {
- content: "";
- position: absolute;
- top: 100%;
- left: 50%;
- margin-left: -5px;
- border-width: 5px;
- border-style: solid;
- border-color: #555 transparent transparent transparent;
- }
- .tooltip-left {
- top: -5px;
- bottom:auto;
- right: 128%;
- }
- .tooltip-left2 {
- top: -5px;
- bottom:auto;
- right: 105%;
- }
- .tooltip-left::after {
- content: "";
- position: absolute;
- top: 50%;
- left: 100%;
- margin-top: -5px;
- border-width: 5px;
- border-style: solid;
- border-color: transparent transparent transparent #555;
- }
- .tooltip .tooltiptext-bottomarrow {
- visibility: hidden;
- width: 120px;
- background-color: #111;
- color: #fff;
- text-align: center;
- border-radius: 6px;
- padding: 5px 0;
- position: absolute;
- z-index: 1;
- bottom: 130%;
- left: 50%;
- margin-left: -60px;
- }
- .tooltip .tooltiptext-bottomarrow::after {
- content: "";
- position: absolute;
- top: 100%;
- left: 50%;
- margin-left: -5px;
- border-width: 5px;
- border-style: solid;
- border-color: black transparent transparent transparent;
- }
- .tooltip:hover .tooltiptext-bottomarrow {
- visibility: visible;
- }
- .tooltip .tooltiptext-toparrow {
- visibility: hidden;
- width: 120px;
- background-color: #111;
- color: #fff;
- text-align: center;
- border-radius: 6px;
- padding: 5px 0;
- position: absolute;
- z-index: 1;
- top: 150%;
- left: 50%;
- margin-left: -60px;
- }
- .tooltip .tooltiptext-toparrow::after {
- content: "";
- position: absolute;
- bottom: 100%;
- left: 50%;
- margin-left: -5px;
- border-width: 5px;
- border-style: solid;
- border-color: transparent transparent black transparent;
- }
- .tooltip:hover .tooltiptext-toparrow {
- visibility: visible;
- }
- .tooltip .tooltiptext-leftarrow {
- visibility: hidden;
- width: 120px;
- background-color: #111;
- color: #fff;
- text-align: center;
- border-radius: 6px;
- padding: 5px 0;
- position: absolute;
- z-index: 1;
- top: -5px;
- left: 110%;
- }
- .tooltip .tooltiptext-leftarrow::after {
- content: "";
- position: absolute;
- top: 50%;
- right: 100%;
- margin-top: -5px;
- border-width: 5px;
- border-style: solid;
- border-color: transparent black transparent transparent;
- }
- .tooltip:hover .tooltiptext-leftarrow {
- visibility: visible;
- }
- .tooltip .tooltiptext-rightarrow {
- visibility: hidden;
- width: 120px;
- background-color: #111;
- color: #fff;
- text-align: center;
- border-radius: 6px;
- padding: 5px 0;
- position: absolute;
- z-index: 1;
- top: -5px;
- right: 110%;
- }
- .tooltip .tooltiptext-rightarrow::after {
- content: "";
- position: absolute;
- top: 50%;
- left: 100%;
- margin-top: -5px;
- border-width: 5px;
- border-style: solid;
- border-color: transparent transparent transparent black;
- }
- .tooltip:hover .tooltiptext-rightarrow {
- visibility: visible;
- }
- </style>
- <table class="reference">
- <tr><td>
- <div class="tooltip">头部显示
- <span class="tooltiptext tooltip-top">提示框文本</span>
- </div>
- </td><td>
- <div class="tooltip">右边显示
- <span class="tooltiptext tooltip-right">提示框文本</span>
- </div>
- </td><td>
- <div class="tooltip">底部显示
- <span class="tooltiptext tooltip-bottom">提示框文本</span>
- </div>
- </td><td>
- <div class="tooltip">左边显示
- <span class="tooltiptext tooltip-left">提示框文本</span>
- </div>
- </td></tr></table>
- <hr>
- <h2>基础提示框(Tooltip)</h2>
- <p>提示框在鼠标移动到指定元素上显示:</p>
- <div class="example">
- <h2 class="example">HTML 代码:</h2>
- <div class="example_code">
- <div class="hl-main"><span class="hl-brackets"><</span><span class="hl-reserved">style</span><span class="hl-brackets">></span></div><div class="hl-main"><span class="hl-comment">/*</span><span class="hl-comment"> Tooltip 容器 </span><span class="hl-comment">*/</span><span class="hl-code">
- </span><span class="hl-identifier">.tooltip</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
- </span><span class="hl-reserved">position:</span><span class="hl-code"> </span><span class="hl-string">relative</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">display:</span><span class="hl-code"> </span><span class="hl-string">inline-block</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">border-bottom:</span><span class="hl-code"> </span><span class="hl-number">1</span><span class="hl-string">px</span><span class="hl-code"> </span><span class="hl-string">dotted</span><span class="hl-code"> </span><span class="hl-var">black</span><span class="hl-reserved"></span><span class="hl-code">; </span><span class="hl-comment">/*</span><span class="hl-comment"> 悬停元素上显示点线 </span><span class="hl-comment">*/</span><span class="hl-code">
- </span><span class="hl-brackets">}</span><span class="hl-code">
-
- </span><span class="hl-comment">/*</span><span class="hl-comment"> Tooltip 文本 </span><span class="hl-comment">*/</span><span class="hl-code">
- </span><span class="hl-identifier">.tooltip</span><span class="hl-code"> </span><span class="hl-identifier">.tooltiptext</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
- </span><span class="hl-reserved">visibility:</span><span class="hl-code"> </span><span class="hl-string">hidden</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">width:</span><span class="hl-code"> </span><span class="hl-number">120</span><span class="hl-string">px</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">background-color:</span><span class="hl-code"> </span><span class="hl-var">black</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">color:</span><span class="hl-code"> </span><span class="hl-var">#fff</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">text-align:</span><span class="hl-code"> </span><span class="hl-string">center</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">padding:</span><span class="hl-code"> </span><span class="hl-number">5</span><span class="hl-string">px</span><span class="hl-code"> </span><span class="hl-number">0</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">border-radius:</span><span class="hl-code"> </span><span class="hl-number">6</span><span class="hl-string">px</span><span class="hl-reserved"></span><span class="hl-code">;
-
- </span><span class="hl-comment">/*</span><span class="hl-comment"> 定位 </span><span class="hl-comment">*/</span><span class="hl-code">
- </span><span class="hl-reserved">position:</span><span class="hl-code"> </span><span class="hl-string">absolute</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">z-index:</span><span class="hl-code"> </span><span class="hl-number">1</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-brackets">}</span><span class="hl-code">
-
- </span><span class="hl-comment">/*</span><span class="hl-comment"> 鼠标移动上去后显示提示框 </span><span class="hl-comment">*/</span><span class="hl-code">
- </span><span class="hl-identifier">.tooltip</span><span class="hl-special">:hover</span><span class="hl-code"> </span><span class="hl-identifier">.tooltiptext</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
- </span><span class="hl-reserved">visibility:</span><span class="hl-code"> </span><span class="hl-string">visible</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-brackets">}</span></div><div class="hl-main"><span class="hl-brackets"></</span><span class="hl-reserved">style</span><span class="hl-brackets">></span><span class="hl-code">
-
- </span><span class="hl-brackets"><</span><span class="hl-reserved">div</span><span class="hl-code"> </span><span class="hl-var">class</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">tooltip</span><span class="hl-quotes">"</span><span class="hl-brackets">></span><span class="hl-code">鼠标移动到这
- </span><span class="hl-brackets"><</span><span class="hl-reserved">span</span><span class="hl-code"> </span><span class="hl-var">class</span><span class="hl-code">=</span><span class="hl-quotes">"</span><span class="hl-string">tooltiptext</span><span class="hl-quotes">"</span><span class="hl-brackets">></span><span class="hl-code">提示文本</span><span class="hl-brackets"></</span><span class="hl-reserved">span</span><span class="hl-brackets">></span><span class="hl-code">
- </span><span class="hl-brackets"></</span><span class="hl-reserved">div</span><span class="hl-brackets">></span></div>
- </div>
- <br>
- <a target="_blank" href="/try/try.php?filename=trycss_tooltip" class="tryitbtn">尝试一下 »</a>
- </div>
- <h3>实例解析</h3>
- <p><strong>HTML)</strong> 使用容器元素 (like <div>) 并添加
- <b>"tooltip"</b> 类。在鼠标移动到 <div> 上时显示提示信息。</p>
- <p>提示文本放在内联函数上(如 <span>) 并使用<b>class="tooltiptext"</b>。</p>
- <p><strong>CSS)</strong><b>tooltip</b> 类使用 <b>position:relative</b>, 提示文本需要设置定位值 <b>position:absolute</b>。
- <strong>注意: </strong> 接下来的实例会显示更多的定位效果。</p>
- <p><b>tooltiptext</b> 类用于实际的提示文本。模式是隐藏的,在鼠标移动到元素显示 。设置了一些宽度、背景色、字体色等样式。
- </p>
- <p>CSS3 <b>border-radius</b> 属性用于为提示框添加圆角。</p>
- <p><b>:hover</b> 选择器用于在鼠标移动到到指定元素 <div> 上时显示的提示。</p>
- <hr>
- <h2>定位提示工具</h2>
- <p>以下实例中,提示工具显示在指定元素的右侧(<b>left:105%</b>) 。</p><p>
- 注意 <b>top:-5px</b> 同于定位在容器元素的中间。使用数字 <strong>5</strong> 因为提示文本的顶部和底部的内边距(padding)是 5px。
- </p><p>
- 如果你修改 padding 的值,top 值也要对应修改,这样才可以确保它是居中对齐的。</p><p>在提示框显示在左边的情况也是这个原理。</p>
- <div class="example">
- <h2 class="example">显示在右侧:</h2>
- <div class="example_code">
- <div class="hl-main"><span class="hl-identifier">.tooltip</span><span class="hl-code"> </span><span class="hl-identifier">.tooltiptext</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
- </span><span class="hl-reserved">top:</span><span class="hl-code"> -</span><span class="hl-number">5</span><span class="hl-string">px</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">left:</span><span class="hl-code"> </span><span class="hl-number">105</span><span class="hl-string">%</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-brackets">}</span></div>
- </div>
- <br>
- <a target="_blank" href="/try/try.php?filename=trycss_tooltip_right" class="tryitbtn">尝试一下 »</a>
- </div><br>
- <div class="example">
- <h2 class="example">显示在左侧:</h2>
- <div class="example_code">
- <div class="hl-main"><span class="hl-identifier">.tooltip</span><span class="hl-code"> </span><span class="hl-identifier">.tooltiptext</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
- </span><span class="hl-reserved">top:</span><span class="hl-code"> -</span><span class="hl-number">5</span><span class="hl-string">px</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">right:</span><span class="hl-code"> </span><span class="hl-number">105</span><span class="hl-string">%</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-brackets">}</span></div>
- </div>
- <br>
- <a target="_blank" href="/try/try.php?filename=trycss_tooltip_left" class="tryitbtn">尝试一下 »</a>
- </div>
- <p>如果你想要提示工具显示在头部和底部。我们需要使用 <b>margin-left</b> 属性,并设置为 -60px。
- 这个数字计算来源是使用宽度的一半来居中对齐,即: width/2 (120/2 = 60)。</p>
- <div class="example">
- <h2 class="example">显示在头部:</h2>
- <div class="example_code">
- <div class="hl-main"><span class="hl-identifier">.tooltip</span><span class="hl-code"> </span><span class="hl-identifier">.tooltiptext</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
- </span><span class="hl-reserved">width:</span><span class="hl-code"> </span><span class="hl-number">120</span><span class="hl-string">px</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">bottom:</span><span class="hl-code"> </span><span class="hl-number">100</span><span class="hl-string">%</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">left:</span><span class="hl-code"> </span><span class="hl-number">50</span><span class="hl-string">%</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">margin-left:</span><span class="hl-code"> -</span><span class="hl-number">60</span><span class="hl-string">px</span><span class="hl-reserved"></span><span class="hl-code">; </span><span class="hl-comment">/*</span><span class="hl-comment"> 使用一半宽度 (120/2 = 60) 来居中提示工具 </span><span class="hl-comment">*/</span><span class="hl-code">
- </span><span class="hl-brackets">}</span></div>
- </div>
- <br>
- <a target="_blank" href="/try/try.php?filename=trycss_tooltip_top" class="tryitbtn">尝试一下 »</a>
- </div>
- <br>
- <div class="example">
- <h2 class="example">显示在底部:</h2>
- <div class="example_code">
- <div class="hl-main"><span class="hl-identifier">.tooltip</span><span class="hl-code"> </span><span class="hl-identifier">.tooltiptext</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
- </span><span class="hl-reserved">width:</span><span class="hl-code"> </span><span class="hl-number">120</span><span class="hl-string">px</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">top:</span><span class="hl-code"> </span><span class="hl-number">100</span><span class="hl-string">%</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">left:</span><span class="hl-code"> </span><span class="hl-number">50</span><span class="hl-string">%</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">margin-left:</span><span class="hl-code"> -</span><span class="hl-number">60</span><span class="hl-string">px</span><span class="hl-reserved"></span><span class="hl-code">; </span><span class="hl-comment">/*</span><span class="hl-comment"> 使用一半宽度 (120/2 = 60) 来居中提示工具 </span><span class="hl-comment">*/</span><span class="hl-code">
- </span><span class="hl-brackets">}</span></div>
- </div>
- <br>
- <a target="_blank" href="/try/try.php?filename=trycss_tooltip_bottom" class="tryitbtn">尝试一下 »</a>
- </div>
- <hr>
- <h2>添加箭头</h2>
- <p>我们可以用CSS 伪元素 ::after 及 content 属性为提示工具创建一个小箭头标志,箭头是由边框组成的,但组合起来后提示工具像个语音信息框。</p>
- <p>以下实例演示了如何为显示在顶部的提示工具添加底部箭头:</p>
- <div class="example">
- <h2 class="example">顶部提示框/底部箭头:</h2>
- <div class="example_code">
- <div class="hl-main"><span class="hl-identifier">.tooltip</span><span class="hl-code"> </span><span class="hl-identifier">.tooltiptext</span><span class="hl-code">:</span><span class="hl-special">:after</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
- </span><span class="hl-reserved">content:</span><span class="hl-code"> " "</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">position:</span><span class="hl-code"> </span><span class="hl-string">absolute</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">top:</span><span class="hl-code"> </span><span class="hl-number">100</span><span class="hl-string">%</span><span class="hl-reserved"></span><span class="hl-code">; </span><span class="hl-comment">/*</span><span class="hl-comment"> 提示工具底部 </span><span class="hl-comment">*/</span><span class="hl-code">
- </span><span class="hl-reserved">left:</span><span class="hl-code"> </span><span class="hl-number">50</span><span class="hl-string">%</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">margin-left:</span><span class="hl-code"> -</span><span class="hl-number">5</span><span class="hl-string">px</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">border-width:</span><span class="hl-code"> </span><span class="hl-number">5</span><span class="hl-string">px</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">border-style:</span><span class="hl-code"> </span><span class="hl-string">solid</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">border-color:</span><span class="hl-code"> </span><span class="hl-var">black</span><span class="hl-code"> </span><span class="hl-string">transparent</span><span class="hl-code"> </span><span class="hl-string">transparent</span><span class="hl-code"> </span><span class="hl-string">transparent</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-brackets">}</span></div>
- </div>
- <br>
- <a target="_blank" href="/try/try.php?filename=trycss_tooltip_arrow_bottom" class="tryitbtn">尝试一下 »</a>
- </div>
- <h3>实例解析</h3>
- <p>在提示工具内定位箭头: <b>top: 100%</b> , 箭头将显示在提示工具的底部。<b>left: 50%</b> 用于居中对齐箭头。</p>
- <p><strong>注意:</strong><b>border-width</b> 属性指定了箭头的大小。如果你修改它,也要修改 <b>margin-left</b> 值。这样箭头在能居中显示。</p>
- <p><b>border-color</b> 用于将内容转换为箭头。设置顶部边框为黑色,其他是透明的。如果设置了其他的也是黑色则会显示为一个黑色的四边形。</p>
- <p>以下实例演示了如何在提示工具的头部添加箭头,注意设置边框颜色:</p>
- <div class="example">
- <h2 class="example">底部提示框/顶部箭头:</h2>
- <div class="example_code">
- <div class="hl-main"><span class="hl-identifier">.tooltip</span><span class="hl-code"> </span><span class="hl-identifier">.tooltiptext</span><span class="hl-code">:</span><span class="hl-special">:after</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
- </span><span class="hl-reserved">content:</span><span class="hl-code"> " "</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">position:</span><span class="hl-code"> </span><span class="hl-string">absolute</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">bottom:</span><span class="hl-code"> </span><span class="hl-number">100</span><span class="hl-string">%</span><span class="hl-reserved"></span><span class="hl-code">; </span><span class="hl-comment">/*</span><span class="hl-comment"> 提示工具头部 </span><span class="hl-comment">*/</span><span class="hl-code">
- </span><span class="hl-reserved">left:</span><span class="hl-code"> </span><span class="hl-number">50</span><span class="hl-string">%</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">margin-left:</span><span class="hl-code"> -</span><span class="hl-number">5</span><span class="hl-string">px</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">border-width:</span><span class="hl-code"> </span><span class="hl-number">5</span><span class="hl-string">px</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">border-style:</span><span class="hl-code"> </span><span class="hl-string">solid</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">border-color:</span><span class="hl-code"> </span><span class="hl-string">transparent</span><span class="hl-code"> </span><span class="hl-string">transparent</span><span class="hl-code"> </span><span class="hl-var">black</span><span class="hl-code"> </span><span class="hl-string">transparent</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-brackets">}</span></div>
- </div>
- <br>
- <a target="_blank" href="/try/try.php?filename=trycss_tooltip_arrow_top" class="tryitbtn">尝试一下 »</a>
- </div>
- <p>以下两个实例是左右两边的箭头实例:</p>
- <div class="example">
- <h2 class="example">右侧提示框/左侧箭头:</h2>
- <div class="example_code">
- <div class="hl-main"><span class="hl-identifier">.tooltip</span><span class="hl-code"> </span><span class="hl-identifier">.tooltiptext</span><span class="hl-code">:</span><span class="hl-special">:after</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
- </span><span class="hl-reserved">content:</span><span class="hl-code"> " "</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">position:</span><span class="hl-code"> </span><span class="hl-string">absolute</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">top:</span><span class="hl-code"> </span><span class="hl-number">50</span><span class="hl-string">%</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">right:</span><span class="hl-code"> </span><span class="hl-number">100</span><span class="hl-string">%</span><span class="hl-reserved"></span><span class="hl-code">; </span><span class="hl-comment">/*</span><span class="hl-comment"> 提示工具左侧 </span><span class="hl-comment">*/</span><span class="hl-code">
- </span><span class="hl-reserved">margin-top:</span><span class="hl-code"> -</span><span class="hl-number">5</span><span class="hl-string">px</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">border-width:</span><span class="hl-code"> </span><span class="hl-number">5</span><span class="hl-string">px</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">border-style:</span><span class="hl-code"> </span><span class="hl-string">solid</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">border-color:</span><span class="hl-code"> </span><span class="hl-string">transparent</span><span class="hl-code"> </span><span class="hl-var">black</span><span class="hl-code"> </span><span class="hl-string">transparent</span><span class="hl-code"> </span><span class="hl-string">transparent</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-brackets">}</span></div>
- </div>
- <br>
- <a target="_blank" href="/try/try.php?filename=trycss_tooltip_arrow_left" class="tryitbtn">尝试一下 »</a>
- </div>
- <br>
- <div class="example">
- <h2 class="example">左侧提示框/右侧箭头:</h2>
- <div class="example_code">
- <div class="hl-main"><span class="hl-identifier">.tooltip</span><span class="hl-code"> </span><span class="hl-identifier">.tooltiptext</span><span class="hl-code">:</span><span class="hl-special">:after</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
- </span><span class="hl-reserved">content:</span><span class="hl-code"> " "</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">position:</span><span class="hl-code"> </span><span class="hl-string">absolute</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">top:</span><span class="hl-code"> </span><span class="hl-number">50</span><span class="hl-string">%</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">left:</span><span class="hl-code"> </span><span class="hl-number">100</span><span class="hl-string">%</span><span class="hl-reserved"></span><span class="hl-code">; </span><span class="hl-comment">/*</span><span class="hl-comment"> 提示工具右侧 </span><span class="hl-comment">*/</span><span class="hl-code">
- </span><span class="hl-reserved">margin-top:</span><span class="hl-code"> -</span><span class="hl-number">5</span><span class="hl-string">px</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">border-width:</span><span class="hl-code"> </span><span class="hl-number">5</span><span class="hl-string">px</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">border-style:</span><span class="hl-code"> </span><span class="hl-string">solid</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">border-color:</span><span class="hl-code"> </span><span class="hl-string">transparent</span><span class="hl-code"> </span><span class="hl-string">transparent</span><span class="hl-code"> </span><span class="hl-string">transparent</span><span class="hl-code"> </span><span class="hl-var">black</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-brackets">}</span></div>
- </div>
- <br>
- <a target="_blank" href="/try/try.php?filename=trycss_tooltip_arrow_right" class="tryitbtn">尝试一下 »</a>
- </div>
- <hr>
- <h2>淡入效果</h2>
- <p>我们可以使用 CSS3 transition 属性及 opacity 属性来实现提示工具的淡入效果:</p>
- <div class="example">
- <h2 class="example">左侧提示框/右侧箭头:</h2>
- <div class="example_code">
- <div class="hl-main"><span class="hl-identifier">.tooltip</span><span class="hl-code"> </span><span class="hl-identifier">.tooltiptext</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
- </span><span class="hl-reserved">opacity:</span><span class="hl-code"> </span><span class="hl-number">0</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-reserved">transition:</span><span class="hl-code"> </span><span class="hl-code">opacity</span><span class="hl-code"> </span><span class="hl-number">1</span><span class="hl-code">s</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-brackets">}</span><span class="hl-code">
-
- </span><span class="hl-identifier">.tooltip</span><span class="hl-special">:hover</span><span class="hl-code"> </span><span class="hl-identifier">.tooltiptext</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code">
- </span><span class="hl-reserved">opacity:</span><span class="hl-code"> </span><span class="hl-number">1</span><span class="hl-reserved"></span><span class="hl-code">;
- </span><span class="hl-brackets">}</span></div>
- </div>
- <br>
- <a target="_blank" href="/try/try.php?filename=trycss_tooltip_transition" class="tryitbtn">尝试一下 »</a>
- </div>
- <hr>
- <h2>更多实例</h2>
- <p><a href="https://c.runoob.com/codedemo/2747" target="_blank">漂亮的 CSS 提示框</a></p>
-
-
- </div>
- </div>
-
- <div class="previous-next-links">
- <div class="previous-design-link"><i style="font-size:16px;" class="fa fa-arrow-left" aria-hidden="true"></i> <a href="http://www.runoob.com/css/css-dropdowns.html" rel="prev"> CSS 下拉菜单</a> </div>
- <div class="next-design-link"></div>
- </div>
- <!-- 笔记列表 -->
- <style>
- .wrapper {
- /*text-transform: uppercase; */
- background: #ececec;
- color: #555;
- cursor: help;
- font-family: "Gill Sans", Impact, sans-serif;
- font-size: 20px;
- position: relative;
- text-align: center;
- width: 200px;
- -webkit-transform: translateZ(0); /* webkit flicker fix */
- -webkit-font-smoothing: antialiased; /* webkit text rendering fix */
- }
- .wrapper .tooltip {
- white-space: nowrap;
- font-size: 14px;
- text-align: left;
- background: #96b97d;
- bottom: 100%;
- color: #fff;
- display: block;
- left: -25px;
- margin-bottom: 15px;
- opacity: 0;
- padding: 14px;
- pointer-events: none;
- position: absolute;
-
- -webkit-transform: translateY(10px);
- -moz-transform: translateY(10px);
- -ms-transform: translateY(10px);
- -o-transform: translateY(10px);
- transform: translateY(10px);
- -webkit-transition: all .25s ease-out;
- -moz-transition: all .25s ease-out;
- -ms-transition: all .25s ease-out;
- -o-transition: all .25s ease-out;
- transition: all .25s ease-out;
- -webkit-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
- -moz-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
- -ms-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
- -o-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
- box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.28);
- }
- .tooltip a {
- color:#fff;
- }
- /* This bridges the gap so you can mouse into the tooltip without it disappearing */
- .wrapper .tooltip:before {
- bottom: -20px;
- content: " ";
- display: block;
- height: 20px;
- left: 0;
- position: absolute;
- width: 100%;
- }
- /* CSS Triangles - see Trevor's post */
- .wrapper .tooltip:after {
- border-left: solid transparent 10px;
- border-right: solid transparent 10px;
- border-top: solid #96b97d 10px;
- bottom: -10px;
- content: " ";
- height: 0;
- left: 20%;
- margin-left: -13px;
- position: absolute;
- width: 0;
- }
- .wrapper .tooltip1 {
- margin-left: 50px;
- padding-top: 0px;
- }
- .wrapper:hover .tooltip {
- opacity: 1;
- pointer-events: auto;
- -webkit-transform: translateY(0px);
- -moz-transform: translateY(0px);
- -ms-transform: translateY(0px);
- -o-transform: translateY(0px);
- transform: translateY(0px);
- }
- /* IE can just show/hide with no transition */
- .lte8 .wrapper .tooltip {
- display: none;
- }
- .lte8 .wrapper:hover .tooltip {
- display: block;
- }
- </style>
- <div id="respond" class="no_webshot">
- <div class="comment-signarea" style="">
- <h3 class="text-muted" id="share_code"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> 点我分享笔记</h3>
- <input type="hidden" name="is_user_logged_in" id="is_user_logged_in" value="0">
- <p style="font-size:14px;">笔记需要是本篇文章的内容扩展!</p>
- <p style="font-size:14px;"><a href="/w3cnote/runoob-user-test-intro.html#invite" target="_blank">注册邀请码获取方式</a></p>
- <!--<h3 class="text-muted"><i class="fa fa-info-circle" aria-hidden="true"></i> 分享笔记前必须<a href="javascript:;" class="runoob-pop">登录</a>!</h3>
- <p><a href="/w3cnote/runoob-user-test-intro.html#invite" target="_blank">注册邀请码获取方式</a></p>-->
- </div>
-
- <form action="/wp-content/themes/runoob/option/addnote.php" method="post" id="commentform" style="display:none;">
- <div class="comt">
- <div class="comt-title">
- <i style="font-size:36px;" class="fa fa-user-circle" aria-hidden="true"></i> <p><a id="cancel-comment-reply-link" href="javascript:;">取消</a></p>
- </div>
- <div class="comt-box">
- <div id="mded"></div>
-
- <div class="comt-ctrl">
- <div class="comt-tips"><input type='hidden' name='comment_post_ID' value='18450' id='comment_post_ID' />
- <input type='hidden' name='comment_parent' id='comment_parent' value='0' />
- </div>
- <button type="submit" name="submit" id="submit" tabindex="5"><i class="fa fa-pencil" aria-hidden="true"></i> 分享笔记</button>
- </div>
- </div>
-
-
- <div class="comt-comterinfo">
- <ul id="comment-author-info">
- <li class="form-inline"><label class="hide" for="author">昵称</label><input class="ipt" type="text" name="author" id="author" value="" tabindex="2" placeholder="昵称"><span class="text-muted">昵称 (必填)</span></li>
- <li class="form-inline"><label class="hide" for="email">邮箱</label><input class="ipt" type="text" name="email" id="email" value="" tabindex="3" placeholder="邮箱"><span class="text-muted">邮箱 (必填)</span></li>
- <li class="form-inline"><label class="hide" for="url">引用地址</label><input class="ipt" type="text" name="url" id="url" value="" tabindex="4" placeholder="引用地址"><span class="text-muted">引用地址</span></li>
- </ul>
- </div>
-
-
- </div>
- </form>
- </div>
- <script type="text/javascript">
- $(function() {
- //初始化编辑器
-
- var editor = new Simditor({
- textarea: $('#mded'),
- placeholder: '写笔记...',
- upload: false,
- defaultImage: 'http://www.runoob.com/images/logo.png',
- codeLanguages: '',
- toolbar: [ 'bold','code','ul','ol','image' ]
- });
- editor.on('selectionchanged', function() {
- $(".code-popover").hide();
- });
- // 提交数据
- $("#share_code").click(function() {
- $(".comment-signarea").hide();
- $("#commentform").show();
-
- });
- // 提交笔记
- var commentform=$('#commentform');
- commentform.prepend('<div id="comment-status" ></div>');
- var statusdiv=$('#comment-status');
-
- commentform.submit(function(e){
- e.preventDefault();
- var noteContent = editor.getValue();
- // console.log(noteContent);
- noteContent = noteContent.replace(/<pre><code>/g,"<pre>");
- noteContent = noteContent.replace(/<\/code><\/pre>/g,"</pre>");
-
- // 系列化表单数据
- var comment_parent = 0;
- var is_user_logged_in = $("#is_user_logged_in").val();
- var comment_post_ID = 18450;
- var _wp_unfiltered_html_comment = $("#_wp_unfiltered_html_comment").val();
- var comment = noteContent;
- var author = $("#author").val();
- var url = $("#url").val();
- var email = $("#email").val();
- if(isBlank(author) && is_user_logged_in==0) {
- statusdiv.html('<p class="ajax-error">请输入昵称!</p>');
- } else if(isBlank(email) && is_user_logged_in==0) {
- statusdiv.html('<p class="ajax-error">请输入邮箱!</p>');
- } else {
- // var formdata=commentform.serialize() + "&comment=" + noteContent ;
- // 添加状态信息
- statusdiv.html('<p>Processing...</p>');
- // 获取表单提交地址
- var formurl=commentform.attr('action');
-
- // 异步提交
- $.ajax({
- type: 'post',
- url: formurl,
- dataType:'json',
- data: {"comment_parent":comment_parent,"comment_post_ID":comment_post_ID, "_wp_unfiltered_html_comment":_wp_unfiltered_html_comment,"comment":comment,"url":url, "email":email,"author":author},
- error: function(XMLHttpRequest, textStatus, errorThrown){
- statusdiv.html('<p class="ajax-error" >数据不完整或表单提交太快了!</p>');
- },
- success: function(data, textStatus){
- if(data.errorno=="0") {
- $("#submit").prop('disabled', true);
- statusdiv.html('<p class="ajax-success" >笔记已提交审核,感谢分享笔记!</p>');
- alert('笔记已提交审核,感谢分享笔记!');
- }else{
- statusdiv.html('<p class="ajax-error" >'+data.msg+'</p>');
- }
- commentform.find('textarea[name=comment]').val('');
- }
- });
- setTimeout(function(){
- $("#submit").prop('disabled', false);
- }, 10*1000);
- }
- return false;
- });
-
- });
- function isBlank(str) {
- return (!str || /^\s*$/.test(str));
- }
- </script>
- <link rel="stylesheet" href="/wp-content/themes/runoob/assets/css/qa.css?1.37">
- <link rel="stylesheet" type="text/css" href="//cdn.bootcss.com/simditor/2.3.6/styles/simditor.min.css" />
- <script type="text/javascript" src="//static.runoob.com/assets/simditor/2.3.6/scripts/module.js"></script>
- <script type="text/javascript" src="//static.runoob.com/assets/simditor/2.3.6/scripts/hotkeys.js"></script>
- <script type="text/javascript" src="//cdn.bootcss.com/simditor/2.3.6/lib/simditor.min.js"></script> <div class="sidebar-box ad-box ad-box-large">
- <div class="ad-336280" style="display: none;">
-
- </div>
- </div>
-
- </div>
- </div>
-
- <!-- 右边栏 -->
- <div class="fivecol last right-column">
- <!--
- <div class="tab tab-light-blue" style="text-align: center;">关注微信</div>
- <div class="sidebar-box">
- <a href="http://m.runoob.com/" target="_blank"> <img src="http://www.runoob.com/wp-content/themes/w3cschool.cc/assets/img/qrcode.jpg" alt="移动版"> </a>
- <div class="qqinfo">
- <a target="_blank" href="http://jq.qq.com/?_wv=1027&k=dOwwKN" id="qqhref">
- <img border="0" src="http://pub.idqqimg.com/wpa/images/group.png" alt="菜鸟家族" title="菜鸟家族"></a>
- <span>(群号:<span id="qqid">365967760</span>)</span>
- </div>
-
- </div>
- -->
- <style>
- .sidebar-tree .double-li {
- width:300px;
- }
- .sidebar-tree .double-li li {
- width: 44%;
- line-height: 1.5em;
- border-bottom: 1px solid #ccc;
- float: left;
- display: inline;
- }
- </style>
-
- <div class="sidebar-box ad-box ad-box-large">
- <div class="sidebar-box advertise-here" style="margin: 0 auto;">
- <a href="javascript:void(0);" style="font-size: 16px; color:#64854c;font-weight:bold;"> <i class="fa fa-list" aria-hidden="true"></i> 分类导航</a>
- </div>
- <div class="sidebar-box sidebar-cate">
-
- <div class="sidebar-tree" >
- <ul><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> HTML / CSS</a><ul class="double-li"><li><a title="HTML 教程" href="//www.runoob.com/html/html-tutorial.html">HTML 教程</a></li><li><a title="HTML5 教程" href="//www.runoob.com/html/html5-intro.html">HTML5 教程</a></li><li><a title="CSS 教程" href="//www.runoob.com/css/css-tutorial.html">CSS 教程</a></li><li><a title="CSS3 教程" href="//www.runoob.com/css3/css3-tutorial.html">CSS3 教程</a></li><li><a title="Bootstrap 教程" href="//www.runoob.com/bootstrap/bootstrap-tutorial.html">Bootstrap 教程</a></li><li><a title="Font Awesome 教程" href="//www.runoob.com/font-awesome/fontawesome-tutorial.html">Font Awesome 教程</a></li><li><a title="Foundation 教程" href="//www.runoob.com/foundation/foundation-tutorial.html">Foundation 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> JavaScript</a><ul class="double-li"><li><a title="JavaScript 教程" href="//www.runoob.com/js/js-tutorial.html">JavaScript 教程</a></li><li><a title="HTML DOM 教程" href="//www.runoob.com/htmldom/htmldom-tutorial.html">HTML DOM 教程</a></li><li><a title="jQuery 教程" href="//www.runoob.com/jquery/jquery-tutorial.html">jQuery 教程</a></li><li><a title="AngularJS 教程" href="//www.runoob.com/angularjs/angularjs-tutorial.html">AngularJS 教程</a></li><li><a title="AngularJS2 教程" href="//www.runoob.com/angularjs2/angularjs2-tutorial.html">AngularJS2 教程</a></li><li><a title="Vue.js 教程" href="//www.runoob.com/vue2/vue-tutorial.html">Vue.js 教程</a></li><li><a title="React 教程" href="//www.runoob.com/react/react-tutorial.html">React 教程</a></li><li><a title="jQuery UI 教程" href="//www.runoob.com/jqueryui/jqueryui-tutorial.html">jQuery UI 教程</a></li><li><a title="jQuery EasyUI 教程" href="//www.runoob.com/jeasyui/jqueryeasyui-tutorial.html">jQuery EasyUI 教程</a></li><li><a title="Node.js 教程" href="//www.runoob.com/nodejs/nodejs-tutorial.html">Node.js 教程</a></li><li><a title="AJAX 教程" href="//www.runoob.com/ajax/ajax-tutorial.html">AJAX 教程</a></li><li><a title="JSON 教程" href="//www.runoob.com/json/json-tutorial.html">JSON 教程</a></li><li><a title="Highcharts 教程" href="//www.runoob.com/highcharts/highcharts-tutorial.html">Highcharts 教程</a></li><li><a title="Google 地图 教程" href="//www.runoob.com/googleapi/google-maps-basic.html">Google 地图 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> 服务端</a><ul class="double-li"><li><a title="PHP 教程" href="//www.runoob.com/php/php-tutorial.html">PHP 教程</a></li><li><a title="Python 教程" href="//www.runoob.com/python/python-tutorial.html">Python 教程</a></li><li><a title="Python3 教程" href="//www.runoob.com/python3/python3-tutorial.html">Python3 教程</a></li><li><a title="Django 教程" href="//www.runoob.com/django/django-tutorial.html">Django 教程</a></li><li><a title="Linux 教程" href="//www.runoob.com/linux/linux-tutorial.html">Linux 教程</a></li><li><a title="Docker 教程" href="//www.runoob.com/docker/docker-tutorial.html">Docker 教程</a></li><li><a title="Ruby 教程" href="//www.runoob.com/ruby/ruby-tutorial.html">Ruby 教程</a></li><li><a title="Java 教程" href="//www.runoob.com/java/java-tutorial.html">Java 教程</a></li><li><a title="C 教程" href="//www.runoob.com/c/c-tutorial.html">C 教程</a></li><li><a title="C++ 教程" href="//www.runoob.com/cplusplus/cpp-tutorial.html">C++ 教程</a></li><li><a title="Perl 教程" href="//www.runoob.com/perl/perl-tutorial.html">Perl 教程</a></li><li><a title="Servlet 教程" href="//www.runoob.com/servlet/servlet-tutorial.html">Servlet 教程</a></li><li><a title="JSP 教程" href="//www.runoob.com/jsp/jsp-tutorial.html">JSP 教程</a></li><li><a title="Lua 教程" href="//www.runoob.com/lua/lua-tutorial.html">Lua 教程</a></li><li><a title="Scala 教程" href="//www.runoob.com/scala/scala-tutorial.html">Scala 教程</a></li><li><a title="Go 教程" href="//www.runoob.com/go/go-tutorial.html">Go 教程</a></li><li><a title="设计模式" href="//www.runoob.com/design-pattern/design-pattern-tutorial.html">设计模式</a></li><li><a title="正则表达式" href="//www.runoob.com/regexp/regexp-tutorial.html">正则表达式</a></li><li><a title="ASP 教程" href="//www.runoob.com/asp/asp-tutorial.html">ASP 教程</a></li><li><a title="AppML 教程" href="//www.runoob.com/appml/appml-tutorial.html">AppML 教程</a></li><li><a title="VBScript 教程" href="//www.runoob.com/vbscript/vbscript-tutorial.html">VBScript 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> 数据库</a><ul class="double-li"><li><a title="SQL 教程" href="//www.runoob.com/sql/sql-tutorial.html">SQL 教程</a></li><li><a title="Mysql 教程" href="//www.runoob.com/mysql/mysql-tutorial.html">Mysql 教程</a></li><li><a title="SQLite 教程" href="//www.runoob.com/sqlite/sqlite-tutorial.html">SQLite 教程</a></li><li><a title="MongoDB 教程" href="//www.runoob.com/mongodb/mongodb-tutorial.html">MongoDB 教程</a></li><li><a title="Redis 教程" href="//www.runoob.com/redis/redis-tutorial.html">Redis 教程</a></li><li><a title="Memcached 教程" href="//www.runoob.com/Memcached/Memcached-tutorial.html">Memcached 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> 移动端</a><ul class="double-li"><li><a title="Android 教程" href="//www.runoob.com/w3cnote/android-tutorial-intro.html">Android 教程</a></li><li><a title="Swift 教程" href="//www.runoob.com/swift/swift-tutorial.html">Swift 教程</a></li><li><a title="jQuery Mobile 教程" href="//www.runoob.com/jquerymobile/jquerymobile-tutorial.html">jQuery Mobile 教程</a></li><li><a title="ionic 教程" href="//www.runoob.com/ionic/ionic-tutorial.html">ionic 教程</a></li><li><a title="Kotlin 教程" href="//www.runoob.com/kotlin/kotlin-tutorial.html">Kotlin 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> XML 教程</a><ul class="double-li"><li><a title="XML 教程" href="//www.runoob.com/xml/xml-tutorial.html">XML 教程</a></li><li><a title="DTD 教程" href="//www.runoob.com/dtd/dtd-tutorial.html">DTD 教程</a></li><li><a title="XML DOM 教程" href="//www.runoob.com/dom/dom-tutorial.html">XML DOM 教程</a></li><li><a title="XSLT 教程" href="//www.runoob.com/xsl/xsl-tutorial.html">XSLT 教程</a></li><li><a title="XPath 教程" href="//www.runoob.com/xpath/xpath-tutorial.html">XPath 教程</a></li><li><a title="XQuery 教程" href="//www.runoob.com/xquery/xquery-tutorial.html">XQuery 教程</a></li><li><a title="XLink 教程" href="//www.runoob.com/xlink/xlink-tutorial.html">XLink 教程</a></li><li><a title="XPointer 教程" href="//www.runoob.com/xlink/xlink-tutorial.html">XPointer 教程</a></li><li><a title="XML Schema 教程" href="//www.runoob.com/schema/schema-tutorial.html">XML Schema 教程</a></li><li><a title="XSL-FO 教程" href="//www.runoob.com/xslfo/xslfo-tutorial.html">XSL-FO 教程</a></li><li><a title="SVG 教程" href="//www.runoob.com/svg/svg-tutorial.html">SVG 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> ASP.NET</a><ul class="double-li"><li><a title="ASP.NET 教程" href="//www.runoob.com/aspnet/aspnet-tutorial.html">ASP.NET 教程</a></li><li><a title="C# 教程" href="//www.runoob.com/csharp/csharp-tutorial.html">C# 教程</a></li><li><a title="Web Pages 教程" href="//www.runoob.com/aspnet/webpages-intro.html">Web Pages 教程</a></li><li><a title="Razor 教程" href="//www.runoob.com/aspnet/razor-intro.html">Razor 教程</a></li><li><a title="MVC 教程" href="//www.runoob.com/aspnet/mvc-intro.html">MVC 教程</a></li><li><a title="Web Forms 教程" href="//www.runoob.com/aspnet/aspnet-intro.html">Web Forms 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> Web Service</a><ul class="double-li"><li><a title="Web Service 教程" href="//www.runoob.com/webservices/webservices-tutorial.html">Web Service 教程</a></li><li><a title="WSDL 教程" href="//www.runoob.com/wsdl/wsdl-tutorial.html">WSDL 教程</a></li><li><a title="SOAP 教程" href="//www.runoob.com/soap/soap-tutorial.html">SOAP 教程</a></li><li><a title="RSS 教程" href="//www.runoob.com/rss/rss-tutorial.html">RSS 教程</a></li><li><a title="RDF 教程" href="//www.runoob.com/rdf/rdf-tutorial.html">RDF 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> 开发工具</a><ul class="double-li"><li><a title="Eclipse 教程" href="//www.runoob.com/eclipse/eclipse-tutorial.html">Eclipse 教程</a></li><li><a title="Git 教程" href="//www.runoob.com/git/git-tutorial.html">Git 教程</a></li><li><a title="Firebug 教程" href="//www.runoob.com/firebug/firebug-tutorial.html">Firebug 教程</a></li></ul></li><li style="margin: 0;"><a href="javascript:void(0);" class="tit"> 网站建设</a><ul class="double-li"><li><a title="HTTP 教程" href="//www.runoob.com/http/http-tutorial.html">HTTP 教程</a></li><li><a title="网站建设指南" href="//www.runoob.com/web/web-buildingprimer.html">网站建设指南</a></li><li><a title="浏览器信息" href="//www.runoob.com/browsers/browser-information.html">浏览器信息</a></li><li><a title="网站主机教程" href="//www.runoob.com/hosting/hosting-tutorial.html">网站主机教程</a></li><li><a title="TCP/IP 教程" href="//www.runoob.com/tcpip/tcpip-tutorial.html">TCP/IP 教程</a></li><li><a title="W3C 教程" href="//www.runoob.com/w3c/w3c-tutorial.html">W3C 教程</a></li><li><a title="网站品质" href="//www.runoob.com/quality/quality-tutorial.html">网站品质</a></li></ul></li></ul> </div>
-
- </div>
- </div>
- <br>
-
- <div class="sidebar-box ad-box ad-box-large">
- <div class="sidebar-box advertise-here">
- <a href="javascript:void(0);">Advertisement</a>
- </div>
- <div class="ad-600160">
- <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
- <!-- 侧栏1 -->
- <ins class="adsbygoogle"
- style="display:inline-block;width:160px;height:600px"
- data-ad-client="ca-pub-5751451760833794"
- data-ad-slot="4106274865"></ins>
- <script>
- (adsbygoogle = window.adsbygoogle || []).push({});
- </script>
- </div>
- </div>
- </div></div>
- </div>
- <script>
- var aid = 18450;
- var uid = 0;
- var url = '/wp-content/themes/runoob/option/user/userinfo.php';
- $(function() {
- $.post( url, {aid:aid, action:"collarticle", opt:'init'}, function( data ) {
- if(data.error==0) {
- $("#content").find("h1:first").append(data.msg);
- $(".comment-signarea").hide();
- $("#commentform").show();
- $("#comment-author-info li:lt(2)").hide();
- $("#is_user_logged_in").val(1);
- $(".comt-title p:first").html(data.username);
- } else {
- $(".comment-signarea").show();
- $("#commentform").hide();
- $("#is_user_logged_in").val(0);
- }
- },'json');
- })
- function coll() {
- $.post( url, {aid:aid, action:"collarticle", opt:'add'},function( data ) {
- if(data.error==0) {
- $("#content").find("h1:first").find("a").attr("href","javascript:void(0);");
- $("#content").find("h1:first").find("img").attr("src","http://www.runoob.com/wp-content/themes/runoob/assets/img/coll2.png").css({width:32+"px",height:32+"px"});
- }
- alert(data.msg);
- },'json');
- }
- </script>
- <!-- 反馈对话框开始 -->
- <script src="/wp-content/themes/runoob/assets/feedback/stable/2.0/feedback.js"></script>
- <link rel="stylesheet" href="/wp-content/themes/runoob/assets/feedback/stable/2.0/feedback.css" />
- <script type="text/javascript">
- $.feedback({
- ajaxURL: '/feedback/runoob_feedback.php',
- html2canvasURL: '/wp-content/themes/runoob/assets/feedback/stable/2.0/html2canvas.js'
- });
- </script>
- <!-- 反馈对话框结束 -->
- <button class="feedback-btn feedback-btn-gray">反馈/建议</button>
- <!-- 底部 -->
- <div id="footer" class="mar-t50">
- <div class="runoob-block">
- <div class="runoob cf">
- <dl>
- <dt>
- 在线实例
- </dt>
- <dd>
- ·<a target="_blank" href="/html/html-examples.html">HTML 实例</a>
- </dd>
- <dd>
- ·<a target="_blank" href="/css/css-examples.html">CSS 实例</a>
- </dd>
- <dd>
- ·<a target="_blank" href="/js/js-examples.html">JavaScript 实例</a>
- </dd>
- <dd>
- ·<a target="_blank" href="/ajx/ajax-examples.html">Ajax 实例</a>
- </dd>
- <dd>
- ·<a target="_blank" href="/jquery/jquery-examples.html">jQuery 实例</a>
- </dd>
- <dd>
- ·<a target="_blank" href="/xml/xml-examples.html">XML 实例</a>
- </dd>
- <dd>
- ·<a target="_blank" href="/java/java-examples.html">Java 实例</a>
- </dd>
-
- </dl>
- <dl>
- <dt>
- 字符集&工具
- </dt>
- <dd>
- · <a target="_blank" href="/charsets/html-charsets.html">HTML 字符集设置</a>
- </dd>
- <dd>
- · <a target="_blank" href="/tags/html-ascii.html">HTML ASCII 字符集</a>
- </dd>
- <dd>
- · <a target="_blank" href="/tags/ref-entities.html">HTML ISO-8859-1</a>
- </dd>
- <dd>
- · <a target="_blank" href="/tags/html-symbols.html">HTML 实体符号</a>
- </dd>
- <dd>
- · <a target="_blank" href="/tags/html-colorpicker.html">HTML 拾色器</a>
- </dd>
- <dd>
- · <a target="_blank" href="//c.runoob.com/front-end/53">JSON 格式化工具</a>
- </dd>
- </dl>
- <dl>
- <dt>
- 最新更新
- </dt>
- <dd>
- ·
- <a href="http://www.runoob.com/w3cnote/17-wallpaper-for-programmer.html" title="17 张程序员壁纸推荐">17 张程序员壁纸...</a>
- </dd>
- <dd>
- ·
- <a href="http://www.runoob.com/w3cnote/linux-autologin-shell.html" title="Linux 实现自动登陆远程机器">Linux 实现自动...</a>
- </dd>
- <dd>
- ·
- <a href="http://www.runoob.com/python3/python3-func-reversed.html" title="Python3 reversed 函数">Python3 reverse...</a>
- </dd>
- <dd>
- ·
- <a href="http://www.runoob.com/python3/python3-func-tuple.html" title="Python3 tuple 函数">Python3 tuple 函数</a>
- </dd>
- <dd>
- ·
- <a href="http://www.runoob.com/python3/python3-func-bytes.html" title="Python3 bytes 函数">Python3 bytes 函数</a>
- </dd>
- <dd>
- ·
- <a href="http://www.runoob.com/python3/python3-func-exec.html" title="Python3 exec 函数">Python3 exec 函数</a>
- </dd>
- <dd>
- ·
- <a href="http://www.runoob.com/python3/python3-func-enumerate.html" title="Python3 enumerate() 函数">Python3 enumera...</a>
- </dd>
- </dl>
- <dl>
- <dt>
- 站点信息
- </dt>
- <dd>
- ·
- <a target="_blank" href="//mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=ssbDyoOAgfLU3crf09venNHd3w" rel="external nofollow">意见反馈</a>
- </dd>
- <dd>
- ·
- <a target="_blank" href="/disclaimer">免责声明</a>
- </dd>
- <dd>
- ·
- <a target="_blank" href="/aboutus">关于我们</a>
- </dd>
- <dd>
- ·
- <a target="_blank" href="/archives">文章归档</a>
- </dd>
-
- </dl>
- <div class="search-share">
- <div class="app-download">
- <div>
- <strong>关注微信</strong>
- </div>
- </div>
- <div class="share">
- <img width="128" height="128" src="/wp-content/themes/runoob/assets/images/qrcode.png" />
- </div>
- </div>
- </div>
- </div>
- <div class="w-1000 copyright">
- Copyright © 2013-2017 <strong><a href="//www.runoob.com/" target="_blank">菜鸟教程</a></strong>
- <strong><a href="//www.runoob.com/" target="_blank">runoob.com</a></strong> All Rights Reserved. 备案号:闽ICP备15012807号-1
- </div>
- </div>
- <div class="fixed-btn">
- <a class="go-top" href="javascript:void(0)" title="返回顶部"> <i class="fa fa-angle-up"></i></a>
- <a class="qrcode" href="javascript:void(0)" title="关注我们"><i class="fa fa-qrcode"></i></a>
- <a class="writer" target="_blank" href="//mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=ssbDyoOAgfLU3crf09venNHd3w" style="font-size: 12px;" title="Bug 反馈"><i class="fa fa-envelope-o" style="font-size: 20px;"></i></a>
- <!-- qrcode modal -->
- <div id="bottom-qrcode" class="modal panel-modal hide fade in">
- <h4>微信关注</h4>
- <div class="panel-body"><img alt="微信关注" width="128" height="128" src="/wp-content/themes/runoob/assets/images/qrcode.png"></div>
- </div>
- </div>
- <div style="display:none;">
-
- <script>
- var _hmt = _hmt || [];
- (function() {
- var hm = document.createElement("script");
- hm.src = "//hm.baidu.com/hm.js?8e2a116daf0104a78d601f40a45c75b4";
- var s = document.getElementsByTagName("script")[0];
- s.parentNode.insertBefore(hm, s);
- })();
- </script>
- </div>
- <script>
- window.jsui={
- www: '//wwww.runoob.com',
- uri: '//www.runoob.com/wp-content/themes/runoob'
- };
- </script>
- <style>
- ol,ul{list-style:none}.cd-switcher a{text-decoration:none;outline:0}.cd-switcher a:hover{text-decoration:underline}a:focus{outline:0;-moz-outline:0}.main_nav{width:300px;height:60px;margin:60px auto 10px auto}.main_nav li{float:left;width:60px;margin-right:10px;font-size:16px;padding:.6em 1em;border-radius:3em;background:#2f889a;text-align:center}.main_nav li a{color:#fff}.errtip{background-color:#fceaea;color:#db5353;padding:8px 15px;font-size:14px;border:1px solid #fc9797;border-radius:5px}.cd-user-modal{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(52,54,66,0.9);z-index:3;overflow-y:auto;cursor:pointer;visibility:hidden;opacity:0;-webkit-transition:opacity .3s 0,visibility 0 .3s;-moz-transition:opacity .3s 0,visibility 0 .3s;transition:opacity .3s 0,visibility 0 .3s}.cd-user-modal.is-visible{visibility:visible;opacity:1;-webkit-transition:opacity .3s 0,visibility 0 0;-moz-transition:opacity .3s 0,visibility 0 0;transition:opacity .3s 0,visibility 0 0}.cd-user-modal.is-visible .cd-user-modal-container{-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);transform:translateY(0)}.cd-user-modal-container{position:relative;width:90%;max-width:500px;background:#FFF;margin:3em auto 4em;cursor:auto;border-radius:.25em;-webkit-transform:translateY(-30px);-moz-transform:translateY(-30px);-ms-transform:translateY(-30px);-o-transform:translateY(-30px);transform:translateY(-30px);-webkit-transition-property:-webkit-transform;-moz-transition-property:-moz-transform;transition-property:transform;-webkit-transition-duration:.3s;-moz-transition-duration:.3s;transition-duration:.3s}.cd-user-modal-container .cd-switcher:after{content:"";display:table;clear:both}.cd-user-modal-container .cd-switcher li{width:50%;float:left;text-align:center}.cd-user-modal-container .cd-switcher li:first-child a{border-radius:.25em 0 0 0}.cd-user-modal-container .cd-switcher li:last-child a{border-radius:0 .25em 0 0}.cd-user-modal-container .cd-switcher a{font-size:1.2em;font-weight:bold;display:block;width:100%;height:50px;line-height:50px;background:#e8f1e2;color:#96b880}.cd-user-modal-container .cd-switcher a.selected{background:#FFF;color:#505260}@media only screen and (min-width:600px){.cd-user-modal-container{margin:4em auto}.cd-user-modal-container .cd-switcher a{height:70px;line-height:70px}}.cd-form{padding:1.4em}.cd-form .fieldset{position:relative;margin:1.4em 0}.cd-form .fieldset:first-child{margin-top:0}.cd-form .fieldset:last-child{margin-bottom:0}.cd-form label{font-size:16px;font-size:.875rem}.cd-form label.image-replace{display:inline-block;position:absolute;left:15px;top:50%;bottom:auto;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%);height:20px;width:20px;overflow:hidden;text-indent:100%;white-space:nowrap;color:transparent;text-shadow:none;background-repeat:no-repeat;background-position:50% 0}.cd-form label.cd-username{background-image:url("/wp-content/themes/runoob/assets/img/cd-icon-username.svg")}.cd-form label.cd-email{background-image:url("/wp-content/themes/runoob/assets/img/cd-icon-email.svg")}.cd-form label.cd-password{background-image:url("/wp-content/themes/runoob/assets/img/cd-icon-password.svg")}.cd-form input{margin:0;padding:0;border-radius:.25em}.cd-form input.full-width{width:80%}.cd-form input.full-width2{width:94%}.cd-form input.has-padding{padding:12px 20px 12px 50px}.cd-form input.has-border{border:1px solid #d2d8d8;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;-o-appearance:none;appearance:none}.cd-form input.has-border:focus{border-color:#98b880;box-shadow:0 0 5px rgba(52,54,66,0.1);outline:0}.cd-form input.has-error{border:1px solid #d76666}.cd-form input[type=password]{padding-right:65px}.cd-form input[type=submit]{padding:16px 0;cursor:pointer;background:#96b97d;color:#FFF;font-weight:bold;border:0;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;-o-appearance:none;appearance:none;font-size:1.2em;font-weight:bold}.no-touch .cd-form input[type=submit]:hover,.no-touch .cd-form input[type=submit]:focus{background:#3599ae;outline:0}@media only screen and (min-width:600px){.cd-form{padding:2em}.cd-form .fieldset{margin:2em 0}.cd-form .fieldset:first-child{margin-top:0}.cd-form .fieldset:last-child{margin-bottom:0}.cd-form input.has-padding{padding:16px 20px 16px 50px}.cd-form input[type=submit]{padding:16px 0}}.cd-close-form{display:block;position:absolute;width:40px;height:40px;right:0;top:-40px;background:url("/wp-content/themes/runoob/assets/img/cd-icon-close.svg") no-repeat center center;text-indent:100%;white-space:nowrap;overflow:hidden}@media only screen and (min-width:1170px){}#cd-login,#cd-signup,#cd-reset-password{display:none}#cd-login.is-selected,#cd-signup.is-selected,#cd-reset-password.is-selected{display:block}
- </style>
- <div class="cd-user-modal">
- <div class="cd-user-modal-container">
- <ul class="cd-switcher">
- <li><a href="javascript:;">用户登录</a></li>
- <li><a href="javascript:;">注册新用户</a></li>
- </ul>
- <div id="cd-login"> <!-- 登录表单 -->
- <div class="cd-form">
- <p class="fieldset">
- <label class="image-replace cd-username" for="signin-username">用户名</label>
- <input class="full-width has-padding has-border" id="signin-username" name=username type="text" placeholder="输入用户名">
- </p>
- <p class="fieldset">
- <label class="image-replace cd-password" for="signin-password">密码</label>
- <input class="full-width has-padding has-border" id="signin-password" name="password" type="password" placeholder="输入密码">
- </p>
-
- <p class="fieldset">
- <input type="checkbox" id="remember-me" checked>
- <label for="remember-me">记住登录状态</label>
- <a href="//www.runoob.com/reset-password" style="float: right;padding-right: 20px;" target="_blank">忘记密码?</a>
- </p>
- <input type="hidden" name="action" value="signin">
- <p class="fieldset">
- <input class="full-width2" type="submit" value="登 录">
- </p>
- <div class="err-msg"></div>
- </div>
- </div>
- <div id="cd-signup"> <!-- 注册表单 -->
- <div class="cd-form">
- <p class="fieldset">
- <label class="image-replace cd-password" for="verifycode">邀请码</label>
- <input class="full-width has-padding has-border" id="signup-verifycode" name="verifycode" type="text" placeholder="输入邀请码">
- </p>
- <p class="fieldset">
- <label class="image-replace cd-username" for="signup-username">用户名</label>
- <input class="full-width has-padding has-border" id="signup-username" name="name" type="text" placeholder="输入用户名">
- </p>
- <p class="fieldset">
- <label class="image-replace cd-email" for="signup-email">邮箱</label>
- <input class="full-width has-padding has-border" name="email" id="signup-email" type="email" placeholder="输入mail">
- </p>
- <p class="fieldset">
- <label class="image-replace cd-password" for="signup-password">密码</label>
- <input class="full-width has-padding has-border" id="signup-password" name="password" type="password" placeholder="输入密码">
- </p>
- <p class="fieldset">
- <label class="image-replace cd-password" for="signup-password">重复输入密码</label>
- <input class="full-width has-padding has-border" id="signup-password" name="password2" type="password" placeholder="重复输入密码">
- </p>
-
- <!--
- <p class="fieldset">
- <input type="checkbox" id="accept-terms">
- <label for="accept-terms">我已阅读并同意 <a href="javascript:;">用户协议</a></label>
- </p>
- -->
-
- <input type="hidden" name="action" value="signup">
- <p class="fieldset">
- <input class="full-width2" type="submit" value="注册新用户">
- </p>
- <p class="fieldset">
- <a href="//www.runoob.com/w3cnote/runoob-user-test-intro.html#invite" target="_blank">如何获取邀请码?</a>
- </p>
- <div class="err-msg"></div>
- </div>
- </div>
- <a href="javascript:;" class="cd-close-form">关闭</a>
- </div>
- </div>
- <script src="/wp-content/themes/runoob/assets/js/main.js?v=1.147"></script>
- <script src="//static.runoob.com/assets/libs/hl/run_prettify.js"></script>
- </body>
- </html>
|