With Twitter Bootstrap, how can I customize the h1 text color of one page and leave the other pages to be default?

前端 未结 8 1616
小蘑菇
小蘑菇 2021-01-31 18:00

On my index page, I want the h1 text color to be white and comes with shadow, but I don\'t want to change the default behavior the h1 on other pages. How can I achieve this?

8条回答
  •  孤街浪徒
    2021-01-31 18:41

    In addition to @Connor Leech's answer.

    If you want to create a new custom typography type of your own, define the following in your css file.

    .text-foo {
      .text-emphasis-variant(#FFFFFF);
    }
    

    The mixin text-emphasis-variant is defined in Bootstrap's mixins.less file.

提交回复
热议问题