12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- *{
- margin: 0;
- padding: 0;
- }
- body{
- font-family:"Arial";
- font-size: 20pt;
- }
- h1{
- width: 100%;
- height: auto;
- text-align: center;
- }
- nav{
- display: inline-block;
- position: relative;
- width: 100%;
- height: auto;
- }
- nav a{
- display: inline-block;
- text-decoration: none;
- color: black;
- cursor: pointer;
- line-height: 1;
- text-align: center;
- }
- nav a:after{
- display: block;
- left: 0;
- width: 0;
- height: 3px;
- background-color: black;
- content: "";
- transition: width 0.3s ease-out;
- }
- nav a:hover:after,
- nav a:focus:after {
- width: 100%;
- }
- nav ul{
- list-style: none;
- padding: 0;
- margin: 0 auto;
- width: 900px;
- height: auto;
- }
- nav li{
- text-align: center;
- display: inline-block;
- padding: 0 0 20px 20px;
- }
- .sub-menu {
- transition: 0.3s ease;
- display: none;
- }
- .sub-menu:hover li{
- display: block;
- }
- /*Если экран меньше 800px то выполняются эти стили*/
- @media screen and (max-width: 800px) {
- nav{
- border-bottom: 0;
- }
- nav ul{
- position: relative;
- display: block;
- height: auto;
- left: 0;
- }
- nav a#pull{
- display: block;
- width: 100%;
- position: relative;
- }
- nav a#pull:after{
- content: "";
- width: 30px;
- height: 30px;
- display: inline-block;
- position: absolute;
- }
- nav li{
- height: auto;
- text-align: left;
- display: block;
- }
- }
|