Files
element/examples/docs/tooltip.md
2016-08-05 17:02:01 +08:00

3.6 KiB

基础用法

鼠标 hover 的时候显示,可选择提示出现的位置。

<style> .box { width: 400px; .top { text-align: center; } .left { float: left; width: 60px; } .right { float: right; width: 60px; } .bottom { clear: both; text-align: center; } .item { margin: 4px; } } </style>
上左 上边 上右
左上 左边 左下
右上 右边 右下
下左 下边 下右

适用于不同情景

Top center
Bottom center

API

参数 说明 类型 可选值 默认值
effect 默认提供的样式 String dark, light dark
content 显示的内容 String
placement 出现位置 String top, top-start, top-end, bottom, bottom-start, bottom-end, left, left-start, left-end, right, right-start, right-end bottom
visible 初始状态是否可见 Boolean false
disabled 控制是否不可见 Boolean false
options popper.js 的参数 Object 参考 popper.js 文档 { boundariesElement: 'body' }