问题描述:

May anyone explain me what is the difference between data-toggle="tooltip" and data-tooltip="tooltip" in bootstrap?. Are they all used for making the tooltip?

Thanks.

网友答案:

you just need to use data-toogle="tooltip" for making the tooltip or data-toogle="popover" for making popover.

example :

<!-- Latest compiled and minified bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">

<!-- Latest compiled and minified bootstrap JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>

<a href="#" data-toggle="tooltip" title="Some tooltip text!">Hover over me</a>
相关阅读:
Top