File tree Expand file tree Collapse file tree 1 file changed +23
-8
lines changed
Expand file tree Collapse file tree 1 file changed +23
-8
lines changed Original file line number Diff line number Diff line change @@ -11,30 +11,45 @@ v. 2.0.0
1111
1212# 安装
1313
14- 只需在页面中引入"tooltip.css"文件即可。
14+ 只需在页面中引入"tooltip.css"或“tooltip.min.css” 文件即可。
1515
1616如:
1717
1818```
1919<link rel="stylesheet" href="css/tooltip.css" />
20+
21+ or(或)
22+
23+ <link rel="stylesheet" href="css/tooltip.min.css" />
2024```
2125
2226# 使用
2327
24- 1、在需要显示提示的标签上添加** tooltip** 属性和** tips ** 两个属性;
28+ 1、在需要显示提示的标签上添加** data- tooltip** 属性和** data-tooltip-text ** 两个属性;
2529
26- 2、** tooltip** 属性值代表方向,可以设置为“left”、“right”、“top”、“bottom”、“top-left”、“top-right”、“bottom-left”和“bottom-right”中的任意一个值;
30+ 2、** data- tooltip** 属性值代表方向,可以设置为“left”、“right”、“top”、“bottom”、“top-left”、“top-right”、“bottom-left”和“bottom-right”中的任意一个值;
2731
28- 3、** tips** 属性存放的是显示所需的文本。
32+ 3、** data-tooltip-text** 属性存放的是显示所需的文本。
33+
34+ 如:
35+ ```
36+ <p data-tooltip="left" data-tooltip-text="左边提示">左边提示</p>
37+ ```
2938
39+ 文本换行:在要换行的地方添加** 
 ** 字符
3040如:
3141```
32- <p tooltip="left" tips="左边提示">左边提示</p>
33- <p tooltip="right" tips="右边提示">右边提示</p>
34- <p tooltip="top" tips="上边提示">上边提示</p>
35- <p tooltip="bottom" tips="下边提示">下边提示</p>
42+ <p data-tooltip="right" data-tooltip-text="右边提示样式 
 这个是右边提示样式哦 
 css3提示样式">右边提示</p>
3643```
3744
45+ # 兼容性:
46+ 1)IE9、IE9+
47+ 2)Firefox
48+ 3)Chrome
49+ 4)360 Browser
50+ 5)Sogou Explorer
51+
52+
3853# MIT License
3954
4055Copyright (c) 2018 梁毫卓
You can’t perform that action at this time.
0 commit comments