If you want to be compatible with Internet Explorer 7 or 8, you need to use a template as follows.
<!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>Document Title</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="menu.css" rel="stylesheet"> </head> <body> </body> </html>
Add class .style-n
to menu. The number n is a value from 1 to 14.
<ul class="nav-bar style-1"> <li class="active"><a href="index.html">Home</a></li> <li><a href="about.html">About</a></li> </ul>
<ul class="nav-bar style-2"> <li class="active"><a href="index.html">Home</a></li> <li><a href="about.html">About</a></li> </ul>
<ul class="nav-bar style-3"> <li class="active"><a href="index.html">Home</a></li> <li><a href="about.html">About</a></li> </ul>
<ul class="nav-bar style-4"> <li class="active"><a href="index.html">Home</a></li> <li><a href="about.html">About</a></li> </ul>
<ul class="nav-bar style-5"> <li class="active"><a href="index.html">Home</a></li> <li><a href="about.html">About</a></li> </ul>
<ul class="nav-bar style-6"> <li class="active"><a href="index.html">Home</a></li> <li><a href="about.html">About</a></li> </ul>
<ul class="nav-bar style-7"> <li class="active"><a href="index.html">Home</a></li> <li><a href="about.html">About</a></li> </ul>
<ul class="nav-bar style-8"> <li class="active"><a href="index.html">Home</a></li> <li><a href="about.html">About</a></li> </ul>
<ul class="nav-bar style-9"> <li class="active"><a href="index.html">Home</a></li> <li><a href="about.html">About</a></li> </ul>
<ul class="nav-bar style-10"> <li class="active"><a href="index.html">Home</a></li> <li><a href="about.html">About</a></li> </ul>
<ul class="nav-bar style-11"> <li class="active"><a href="index.html">Home</a></li> <li><a href="about.html">About</a></li> </ul>
<ul class="nav-bar style-12"> <li class="active"><a href="index.html">Home</a></li> <li><a href="about.html">About</a></li> </ul>
<ul class="nav-bar style-13"> <li class="active"><a href="index.html">Home</a></li> <li><a href="about.html">About</a></li> </ul>
<ul class="nav-bar style-14"> <li class="active"><a href="index.html">Home</a></li> <li><a href="about.html">About</a></li> </ul>
Open the file menu.less
in the less
folder.
Add the following code to the end of this file.
.createNavColor (style-name, background-color, hover-color);
After that, compile menu.less
file. For example, the console
lessc menu.less > menu.css