国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > CSS > 正文

純css實現首次登入的新手幫助提示功能

2024-07-11 08:28:52
字體:
來源:轉載
供稿:網友

整體效果展示
這類新手提示的插件還真是少,無奈之下自己寫了一個,不帶任何圖片,完全css實現。因為考慮到功能比較特殊,使用不會太頻繁,就沒寫成插件的模式,所有都是寫死的,可以看下HTML代碼結構

復制代碼
代碼如下:
<div class="help">
<a href="###" class="close" title="關閉新手幫助">×</a>
<div id="step1" class="step" step="1" style="top:60px;left:320px;width:250px">
<b class="jt jt_top" style="left:40px;top:-40px"></b>
<p>
<span class="h1">①</span><span class="h2">注冊登錄</span>
點這里,點這里,點這里

<a href="###" class="next">下一步</a>
</p>
</div>
<div id="step2" class="step" step="2" style="top:200px;left:400px;width:250px">
<b class="jt jt_left" style="top:20px;left:-40px"></b>
<p>
<span class="h1">②</span><span class="h2">商品分類</span>
看到了么?看到了么?看到了么?

<a href="###" class="next">下一步</a>
</p>
</div>
<div id="step3" class="step" step="3" style="top:200px;left:500px;width:250px">
<b class="jt jt_top" style="top:-40px;left:40px"></b>
<p>
<span class="h1">③</span><span class="h2">搜索框</span>
這個就不用我介紹了吧 =)

<a href="###" class="over"> 完 成 </a>
</p>
</div>
</div>

重點看下每一步的html代碼結構

復制代碼
代碼如下:
<div id="step1" class="step" step="1" style="top:60px;left:320px;width:250px">
<b class="jt jt_top" style="left:40px;top:-40px"></b>
<p>
<span class="h1">①</span><span class="h2">注冊登錄</span>
點這里,點這里,點這里

<a href="###" class="next">下一步</a>
</p>
</div>

如果要新增加一步,就把這段復制,然后把其中修改其中的內容即可,但要確保step參數的順序必須是正序,然后id的后綴值也是要正序,與step一樣,剩下就是修改窗口top、left的布局以及箭頭的top、left布局。
還有一點,箭頭可以設置方向,樣式分別為:jt_top、jt_bottom、jt_left、jt_right。
介紹就這么多了,剩下的就是css和js代碼,我就不多說了,大家自己看吧

復制代碼
代碼如下:
*{margin:0;padding:0}
form,ul,ol,li,dl,dt,dd,h1,h2,h3,h4,h5,p{list-style:none outside none}
a{text-decoration:none;color:#ccc;outline:none}
a:hover{text-decoration:none}
a img{border:none}
.fr{float:right}
.fl{float:left}
.disn{display:none}
html{height:100%;overflow:hidden;-moz-user-select:none;-khtml-user-select:none;user-select:none}
body{font:12px/1.8 /5FAE/8F6F/96C5/9ED1,/5B8B/4F53;background:url(bg.png)}
.help{position:absolute;z-index:5555;width:100%;height:100%;background:none rgba(0, 0, 0, 0.7);display:none}
.help .close{float:right;font-size:40px;color:#fff;width:40px;height:40px;line-height:36px;text-align:center;background:none}
.help .close:hover{background:none rgba(0, 0, 0, 0.7)}
.help .step{position:absolute;color:#eee;padding:0 20px 15px;background:none rgba(0, 0, 0, 0.7);border-radius:5px;display:none}
.help .step .jt{font-size:0;height:0;border:20px solid rgba(0, 0, 0, 0);position:absolute}
.help .step .jt_left{border-right:20px solid rgba(0, 0, 0, 0.7)}
.help .step .jt_right{border-left:20px solid rgba(0, 0, 0, 0.7)}
.help .step .jt_top{border-bottom:20px solid rgba(0, 0, 0, 0.7)}
.help .step .jt_bottom{border-top:20px solid rgba(0, 0, 0, 0.7)}
.help .step .h1{font-size:40px;font-weight:bold}
.help .step .h2{font-size:28px;font-weight:bold;padding-left:10px}
.help .step .next,
.help .step .over{border:1px solid #fff;color:#fff;padding:0 5px;float:right;margin-top:10px}
.help .step .next:hover,
.help .step .over:hover{background:none rgba(50, 50, 50, 0.7)}
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 岗巴县| 来宾市| 仁怀市| 鄂伦春自治旗| 双峰县| 香港 | 荔波县| 斗六市| 宕昌县| 专栏| 若羌县| 甘孜| 巴马| 哈巴河县| 卢龙县| 五峰| 曲阜市| 竹溪县| 东阿县| 武夷山市| 娄烦县| 延安市| 安仁县| 镇巴县| 同仁县| 阿拉善左旗| 永胜县| 思南县| 白朗县| 新田县| 定远县| 武穴市| 嘉善县| 武强县| 泰州市| 竹北市| 江阴市| 瑞昌市| 宾川县| 隆德县| 高平市|