我创建了这样的代码:
<a href="#" data-toggle="popover" data-trigger="focus" title data-content="
<ul>
<li>Booking Period is from Immediately</li>
<li>Travelling Period</li>
</ul>" data-original-title>
我从这段代码中得到了<ul>
:
<a class="text-info" href="#" data-toggle="popover" data-trigger="focus"
title=""
data-content="<?=$row_rates['data']->description?>">
<i class="fa fa-info-circle" aria-hidden="true" style="font-size:22px"></i>
</a>
如何更改<li>
代码中的内容字体大小?
答案 0 :(得分:1)
<a href="#" data-toggle="popover" data-trigger="focus" title data-content="
<ul>
<style>
li{
font:size:20px;
}
</style>
<li>Booking Period is from Immediately</li>
<li>Travelling Period</li>
</ul>" data-original-title>
答案 1 :(得分:0)
您可以尝试这样
ul > li {
font-size:10px;
}
答案 2 :(得分:0)
您可以通过内联css更改字体为
<a href="#" data-toggle="popover" data-trigger="focus" title data-content="
<ul style="font-size:20px" /*as font-size you want*/>
<li>Booking Period is from Immediately</li>
<li>Travelling Period</li>
</ul>" data-original-title>
or By internal css as
<style>
ul li {
font-size:20px; /*as font-size you want*/
}
</style>
答案 3 :(得分:0)
添加此样式.popover ul li {font-size:28px; color:red;}
尝试下面
$(document).ready(function(){
$('[data-toggle="popover"]').popover({
delay: 10 // this is definitely needed !
});
});
// Listen for inserted template to DOM
$('[data-toggle="popover"]').on('inserted.bs.popover', function () {
// Create the inside link.
$inside = $('<ul class="divider"><li>Booking Period is from Immediately</li><li>Travelling Period</li></ul>');
// Add the click event-handler only once
$('.popover-content').append($inside[0])
})
&#13;
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"/>
<a href='#' class='btn' title ='Test' data-trigger='focus' data-toggle='popover' data-html='true' id = 'testOutside'>Click Here </a>
&#13;
答案 4 :(得分:0)
在HTML页面中添加此样式
a>ul>li{
font-size:15px;
}