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

首頁(yè) > 編程 > HTML > 正文

點(diǎn)擊HTML頁(yè)面問(wèn)號(hào)出現(xiàn)提示框(附源碼)

2020-03-24 18:43:55
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友
本篇文章給大家?guī)?lái)的內(nèi)容是關(guān)于點(diǎn)擊html' target='_blank'>HTML頁(yè)面問(wèn)號(hào)出現(xiàn)提示框(附源碼),有一定的參考價(jià)值,有需要的朋友可以參考一下,希望對(duì)你有所幫助。

本demo的功能:點(diǎn)擊頁(yè)面按鈕在其邊緣出現(xiàn)提示信息,點(diǎn)擊頁(yè)面任何一處則消失。

如下圖:

1.所需插件:

jquery插件;

layer插件;

2.HTML內(nèi)容:

==注意==:

>

data-tips屬性是必須的。

data-tips屬性中:type: 1 不用修改;

data-tips屬性中:txt內(nèi)容即是要提示的內(nèi)容。

 html  head  link rel= stylesheet href= style.css type= text/css /  /head  body  div >3.css內(nèi)容:(非必要)

本demo的css非必須,不影響功能;

.edi-icon { font-size: 18px; font-style: normal; -webkit-font-smoothing: antialiased; -webkit-text-stroke-width: .2px; -moz-osx-font-smoothing: grayscale; *display: inline; *zoom: 1; cursor: pointer;}
4.javascript內(nèi)容:(核心)
//定義提示彈出框;var helpTipsLayer;//定義彈出框的默認(rèn)設(shè)置;function helpTips(t) { this.options = {},  this.options.elem = .j-help-tips , //與頁(yè)面class相對(duì)應(yīng); this.options.type = 1,  this.options.color = #8db3d7 ,  this.options.time = 0, //設(shè)置0是提示彈出框不會(huì)自動(dòng)消失;可設(shè)置為其他數(shù)字,以毫秒為單位; this.options.titleEnd = 錄入提示 ,  this.options.width = 600px ,  this.options.height = ,  this.options.imgWidth = 233 ,  this.options.imgHeight = 375 ,  undefined != typeof t (this.options = $.extend({}, this.options, t)),  this.elemObj = $(this.options.elem)function() { //點(diǎn)擊頁(yè)面任何一處可使提示彈出框消失; $(document).on( click , function(event){ var e = event || window.event; var target = e.target || e.srcElement; var flag = $(target).hasClass( j-help-tips  if(helpTipsLayer !flag){ layer.close(helpTipsLayer);}(), helpTips.prototype = { constructor : helpTips, init : function() { this.bindEvent() bindEvent : function() { var t = this; t.elemObj.on( click , function() { layer.close(helpTipsLayer);//點(diǎn)擊其他任意的提示框按鈕,則關(guān)閉上一個(gè)提示框。 var i = $(this), o = i.data( tips  if ( undefined != typeof o undefined != typeof o.type 1 == o.type) { undefined != typeof o undefined != typeof o.txt ? helpTipsLayer = layer.tips(o.txt, i, { tips : [ t.options.type, t.options.color ], time : t.options.time }) : t.log() } else { if ( undefined != typeof o.title undefined != typeof o.txt undefined != typeof o.img) { var e = p >

以上就是點(diǎn)擊HTML頁(yè)面問(wèn)號(hào)出現(xiàn)提示框(附源碼)的詳細(xì)內(nèi)容,html教程

鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請(qǐng)第一時(shí)間聯(lián)系我們修改或刪除,多謝。

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 崇左市| 雷州市| 灌云县| 大港区| 松滋市| 错那县| 石屏县| 鸡泽县| 靖安县| 镇远县| 开远市| 吴忠市| 怀远县| 多伦县| 察隅县| 绥化市| 长武县| 耿马| 康乐县| 新乐市| 崇明县| 杨浦区| 公主岭市| 上思县| 保德县| 徐水县| 巴青县| 宁南县| 神农架林区| 顺昌县| 民和| 岳阳市| 奉新县| 台东县| 南平市| 吴川市| 龙泉市| 孟州市| 渑池县| 赤峰市| 玛曲县|