css - Bootstrap 3 中文本变得可点击和样式改变的奇怪行为

标签 css html twitter-bootstrap twitter-bootstrap-3

http://codepen.io/sodacrunch/pen/VLvEya

当您点击“营养信息”或“成分”或“订单”时,它们的样式会发生变化。是什么让他们能够首先点击?我没有 javascript 或 CSS 来实现这种变化/效果。

“成分”HTML/CSS 示例

<p class="product-info-title">Ingredients</p>

.product-info-title {
  font-size: 18px;
  color: #00703C;
  font-weight: bold;
  padding: 0;
  margin: 0 0 10px 0;
 }

最佳答案

你有这个 css,除了你发布的那个,这里的属性 active 意味着“点击”css 将更改为以下内容:

.product-info-title:active {
        font-size: 16px;
        color: #666 !important;
        text-decoration: none !important;
        padding: 0;
        margin: 0 0 20px 0;
        display: inline-block;
    }

试试这个 http://codepen.io/venu/pen/waKYXp

关于css - Bootstrap 3 中文本变得可点击和样式改变的奇怪行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30089399/

相关文章:

javascript - 如何在图像上方的列中心画一条黑线?

html - Bootstrap 中的水平表单表单内联

php - 网站在 CSS 之前加载 HTML?没有使用@import

jquery - 模式上的提交按钮不会提交

twitter-bootstrap - Bootstrap 4 Alpha 6 navbar-toggler-right 和 left 产生奇怪的行为

javascript - 状态改变时在 React JS 中实现过渡效果

javascript - 如何在 Bootstrap 模式中根据用户从选项菜单中的选择导航到 URL?

html - 移动版超瘦,视口(viewport)设置,无重叠元素

javascript - 如何根据值更改标签中文本的颜色

javascript - Bootstrap-自动调整div内的字体