Я хочу создать всплывающую подсказку, содержимое которой отображается после нажатия на значок подсказки.В настоящее время он работает при наведении курсора, но я хочу, чтобы это было по щелчку с отзывчивым мобильным устройством.
Дизайн рабочего стола должен выглядеть следующим образом: ![enter image description here](https://i.stack.imgur.com/FQPyt.png)
Мобильный дизайн должен выглядеть следующим образом:
![enter image description here](https://i.stack.imgur.com/rwkAi.png)
Есть ли другой способ сделать это ... с моим кодом или другимway.
.tooltip-inner{
max-width: 527px;
/* width: 600px; */
padding:10px 15px;
color:#212121;
text-align:center;
background: #fff;
font-size: 16px;
line-height: 23px;
font-family: Arial;
border: 2px solid #D6D6D6;
-webkit-border-radius:9px;
-moz-border-radius:9px;
border-radius:6px;
text-align: left;
position: relative;
}
.tooltip.bs-tooltip-auto[x-placement^=right] .arrow::before, .tooltip.bs-tooltip-right .arrow::before,
.tooltip.bs-tooltip-auto[x-placement^=right] .arrow::after, .tooltip.bs-tooltip-right .arrow::after {
right: 100%;
top: 50%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
margin-left: -50px;
}
.tooltip.bs-tooltip-auto[x-placement^=right] .arrow::after, .tooltip.bs-tooltip-right .arrow::after {
border-color: rgba(136, 183, 213, 0);
border-right-color: #fff;
border-width: 15px;
margin-top: -15px;
}
.tooltip.bs-tooltip-auto[x-placement^=right] .arrow::before, .tooltip.bs-tooltip-right .arrow::before {
border-color: rgba(214, 214, 214, 0);
border-right-color: #D6D6D6;
border-width: 18px;
margin-top: -18px;
}
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<title>Hello, world!</title>
</head>
<body>
<h1>Hello, world!</h1>
<a style="position:relative;" class="text-dark" data-toggle="tooltip" data-html="true" data-placement="right" title="The email address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by email.">
Hover here
</a>
<h1>Dummy text</h1>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script>
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
</script>
</body>
</html>