欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

純css實(shí)現(xiàn)首次登入的新手幫助提示功能

  發(fā)布時(shí)間:2013-04-01 10:30:27   作者:佚名   我要評(píng)論
新手幫助提示功能適用于首次登入一些管理界面時(shí)出現(xiàn)的提示幫助信息,接下來為大家詳細(xì)介紹下適用純css實(shí)現(xiàn)新手幫助提示功能,感興趣的朋友可以參考下哈

整體效果展示
這類新手提示的插件還真是少,無奈之下自己寫了一個(gè),不帶任何圖片,完全css實(shí)現(xiàn)。因?yàn)榭紤]到功能比較特殊,使用不會(huì)太頻繁,就沒寫成插件的模式,所有都是寫死的,可以看下HTML代碼結(jié)構(gòu)

復(fù)制代碼
代碼如下:

<div class="help">
<a href="###" class="close" title="關(guān)閉新手幫助">×</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">注冊(cè)登錄</span>
點(diǎn)這里,點(diǎn)這里,點(diǎn)這里

<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>
這個(gè)就不用我介紹了吧 =)

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

重點(diǎn)看下每一步的html代碼結(jié)構(gòu)

復(fù)制代碼
代碼如下:

<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">注冊(cè)登錄</span>
點(diǎn)這里,點(diǎn)這里,點(diǎn)這里

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

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

復(fù)制代碼
代碼如下:

*{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)}


復(fù)制代碼
代碼如下:

$(function(){
$('.help').show();
$('#step1').show();
$('.close').on('click',function(){
$('.step').hide();
$('.help').hide();
});
$('.next').on('click',function(){
var obj = $(this).parents('.step');
var step = obj.attr('step');
obj.hide();
$('#step'+(parseInt(step)+1)).show();
});
$('.over').on('click',function(){
$(this).parents('.step').hide();
$('.help').hide();
});
});

下載地址:點(diǎn)擊下載

相關(guān)文章

  • 前端CSS Grid 布局示例詳解

    CSS Grid 是一種二維布局系統(tǒng),可以同時(shí)控制行和列,相比 Flex(一維布局),更適合用在整體頁面布局或復(fù)雜模塊結(jié)構(gòu)中,這篇文章主要介紹了前端CSS Grid 布局詳解,需要的朋
    2025-04-16
  • CSS Padding 和 Margin 區(qū)別全解析

    CSS 中的 padding 和 margin 是兩個(gè)非?;A(chǔ)且重要的屬性,它們用于控制元素周圍的空白區(qū)域,本文將詳細(xì)介紹 padding 和 margin 的概念、區(qū)別以及如何在實(shí)際項(xiàng)目中使用它們
    2025-04-07
  • CSS will-change 屬性示例詳解

    will-change 是一個(gè) CSS 屬性,用于告訴瀏覽器某個(gè)元素在未來可能會(huì)發(fā)生哪些變化,本文給大家介紹CSS will-change 屬性詳解,感興趣的朋友一起看看吧
    2025-04-07
  • CSS去除a標(biāo)簽的下劃線的幾種方法

    本文給大家分享在 CSS 中,去除a標(biāo)簽(超鏈接)的下劃線的幾種方法,本文給大家介紹的非常詳細(xì),感興趣的朋友一起看看吧
    2025-04-07
  • 前端高級(jí)CSS用法示例詳解

    在前端開發(fā)中,CSS(層疊樣式表)不僅是用來控制網(wǎng)頁的外觀和布局,更是實(shí)現(xiàn)復(fù)雜交互和動(dòng)態(tài)效果的關(guān)鍵技術(shù)之一,隨著前端技術(shù)的不斷發(fā)展,CSS的用法也日益豐富和高級(jí),本文將
    2025-04-07
  • css中的 vertical-align與line-height作用詳解

    文章詳細(xì)介紹了CSS中的`vertical-align`和`line-height`屬性,包括它們的作用、適用元素、屬性值、常見使用場(chǎng)景、常見問題及解決方案,感興趣的朋友跟隨小編一起看看吧
    2025-03-26
  • 淺析CSS 中z - index屬性的作用及在什么情況下會(huì)失效

    z-index屬性用于控制元素的堆疊順序,值越大,元素越顯示在上層,它需要元素具有定位屬性(如relative、absolute、fixed或sticky),本文給大家介紹CSS 中z - index屬性的作用
    2025-03-21
  • CSS @media print 使用詳解

    文章詳細(xì)介紹了CSS中的打印媒體查詢@mediaprint包括基本語法、常見使用場(chǎng)景和代碼示例,如隱藏非必要元素、調(diào)整字體和顏色、處理鏈接的URL顯示、分頁控制、調(diào)整邊距和背景等
    2025-03-18
  • CSS模擬 html 的 title 屬性(鼠標(biāo)懸浮顯示提示文字效果)

    本文介紹了如何使用CSS模擬HTML的title屬性,通過鼠標(biāo)懸浮顯示提示文字效果,通過設(shè)置`.tipBox`和`.tipBox.tipContent`的樣式,實(shí)現(xiàn)了提示內(nèi)容的隱藏和顯示,感興趣的朋友一起
    2025-03-10
  • 前端 CSS 動(dòng)態(tài)設(shè)置樣式::class、:style 等技巧(推薦)

    本文介紹了Vue.js中動(dòng)態(tài)綁定類名和內(nèi)聯(lián)樣式的兩種方法:對(duì)象語法和數(shù)組語法,通過對(duì)象語法,可以根據(jù)條件動(dòng)態(tài)切換類名或樣式;通過數(shù)組語法,可以同時(shí)綁定多個(gè)類名或樣式,此外
    2025-02-26

最新評(píng)論