Home  >  Article  >  php教程  >  Customize LESS-color and navigation bar in Bootstrap (recommended)

Customize LESS-color and navigation bar in Bootstrap (recommended)

高洛峰
高洛峰Original
2016-12-06 11:00:441514browse

Theme Color

At the beginning of the variables.less file, you can see the default variables and their values ​​​​for gray and brand colors

@gray-darker: lighten(#000,13.5%); //#222
@gray-dark

We can directly replace them to cover the complete grayscale space we need

@gray-darker: #222;
@gray-dark: #454545;
@gray: #777;
@gray-light: #aeaeae;
@gray-lighter: #ccc
@gray-lightest: #ededed
@offwhite: #fafafa;

Change the brand color to golden yellow:

@brand-primary: #c1ba62;

Navigation bar color variable

Modify the following values ​​in variables.less:

@navbar-height: 64px;
@navbar-margin-bottom: 0; // was @line-height-computed
...
@navbar-default-color: @gray;
@navbar-default-bg: #fff;
@navbar-default-border: @gray-light; // darken(@navbar-default-bg, 9.5%);
...
// Navbar links
@navbar-default-link-color: @navbar-default-color;
@navbar-default-link-hover-color: @link-hover-color;
@navbar-default-link-hover-bg: @off-white;
@navbar-default-link-active-color: @link-hover-color;
@navbar-default-link-active-bg: @gray-lightest;
@navbar-default-link-disabled-color: @gray-lighter;
@navbar-default-link-disabled-bg: transparent;

The relevant navigation bar will appear new feature.


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn