增加 em 的字体大小

increase font size of em

本文关键字:字体 em 增加      更新时间:2023-09-26

我正在使用JS将html绑定到如下所示的页面。

      _strInnerHtml += "<em>" + value.cate_name + " | " + value.city_name + "</em>";
      _strInnerHtml += "<a href='#' class='activity-item-toggle'><i class='fa'></i></a>";
      _strInnerHtml += "<div class='activity-item-detail'>";
      _strInnerHtml += "<em>Address 1 : " + value.dire_address_1 + "</em>";
      _strInnerHtml += "<em>City : " + value.city_name + "</em>";
      _strInnerHtml += "</div>";
      _strInnerHtml += "</div>";

我想增加emfont-size,但不能。

这是我尝试的方式

.activity-item-detail{
         font-size:15px;
         }
例如,

您应该使用 chrome 的工具检查您的页面,以查看 css 元素提供了什么actvity-item-detail其字体大小属性。也许这可以工作,因为它更精确:

.activity-item-detail em {
    font-size: 15px;
}