我使用jQuery的如下樣式我提示工具提示功能和CSS
$(function() {
// select all desired input fields and attach tooltips to them
$("#tooltips :input").tooltip({
// place tooltip on the right edge
position: "center left",
// a little tweaking of the position
offset: [-2, 10],
// use the built-in fadeIn/fadeOut effect
effect: "fade",
});
});
和我的CSS是
#myform {
height: auto;
}
#tooltip{
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
background-color: #fff !important;
border: 1px solid !important;
border-radius: 5px;
border-color: #bbb #bbb #a8a8a8;
padding: 16px;
z-index: 2000 !important;
width: 255px;
line-height: 17px;
top: 48px;
margin-left:-16px !important;
font-style: italic;
color: #7d7d7d;
font-size: 13px;
-webkit-transition: all 0.218s;
-moz-transition: all 0.218s;
-o-transition: all 0.218s;
transition: all 0.218s;
}
#tooltip:after {
content: '';
position: absolute;
border: 3px solid rgba(51, 51, 51, 0.9);
border-color: transparent white;
border-width: 8px 0 8px 7px;
top: 40%;
right: -6px;
}
#tooltip:before {
content: '';
position: absolute;
border: 2px solid #333;
border-color: transparent #000;
border-width: 8px 0 8px 6px;
top: 40%;
right: -6px;
}
我想CSS的名稱更改爲別的,而不是提示,但是當我更改我的CSS名稱時,工具提示不起作用。
任何幫助,將不勝感激
嘗試引導工具提示。其易於使用 http://getbootstrap.com/javascript/#tooltips –
你可以使用任何名稱,而不是#tooltips,例如#mytooltips,但元素名稱應該是相同的 – bitkot