Navigační menu na CSS3.

 2012-01-27 00:00:00
 Dmitry Burobin

Navigační menu je jedním z důležitých prvku každého webu. V daném článku vytvoříme atraktivní menu na CSS3.

Ukázka!

css_menu

HTML

Označení pro menu je poměrně jednoduché a vyskituje se prvek HTML5 tag nav:

<nav>
    <
ul>
        <
li><a href="">Hlavní</a></li>
        <
li><a href="">Kategorie</a></li>
        <
li><a href="">O nás</a></li>                
        <
li><a href="">Portfolio</a></li>
        <
li><a href="">Kontakt</a></li>
    </
ul>
</
nav>

CSS


nav  {
    
displayblock;
    
width100%;
    
overflowhidden;
}

nav ul {
    
margin80px 0 20px 0;
    
padding.7em;
    
floatleft;
    list-
stylenone;
    
background#444;
    
backgroundrgba(0,0,0,.2);
    -
moz-border-radius.5em;
    -
webkit-border-radius.5em;
    
border-radius.5em;    
    -
moz-box-shadow0 1px 0 rgba(255,255,255,.2), 
0 2px 1px rgba(0,0,0,.8inset;
    -
webkit-box-shadow0 1px 0 rgba(255,255,255,.2), 
0 2px 1px rgba(0,0,0,.8inset;
    
box-shadow0 1px 0 rgba(255,255,255,.2), 
0 2px 1px rgba(0,0,0,.8inset
}

nav li {
    
float:left;
}

nav a {
    
float:left;
    
padding.8em 1.5em;
    
text-decorationnone;
    
color#555;
    
text-shadow0 1px 0 rgba(255,255,255,.5);
    
fontbold 1.1em/'trebuchet MS'ArialHelvetica;
    
letter-spacing1px;
    
text-transformuppercase;
    
border-width1px;
    
border-stylesolid;
    
border-color#fff #ccc #999 #eee;
    
background#c1c1c1;
    /*Gradient pozadí*/
    
background: -moz-linear-gradient(#f5f5f5, #c1c1c1);
    
background: -webkit-gradient(linearleft topleft bottom
from(#f5f5f5), to(#c1c1c1));
    
background: -webkit-linear-gradient(#f5f5f5, #c1c1c1);
    
background: -o-linear-gradient(#f5f5f5, #c1c1c1);
    
background: -ms-linear-gradient(#f5f5f5, #c1c1c1);
    
backgroundlinear-gradient(#f5f5f5, #c1c1c1);            
 
}
 
nav a:hovernav a:focus {
    
outline0;
    
color#fff;
    
text-shadow0 1px 0 rgba(0,0,0,.2);
    
background#fac754;
    /*Gradient pozadí*/
    
background: -moz-linear-gradient(#fac754, #f8ac00);
    
background: -webkit-gradient(linearleft topleft bottom
from(#fac754), to(#f8ac00));
    
background: -webkit-linear-gradient(#fac754, #f8ac00);
    
background: -o-linear-gradient(#fac754, #f8ac00);
    
background: -ms-linear-gradient(#fac754, #f8ac00);
    
backgroundlinear-gradient(#fac754, #f8ac00);
}

nav a:active {
    
/*Odstíny*/
    
-moz-box-shadow0 0 2px 2px rgba(0,0,0,.3inset;
    -
webkit-box-shadow0 0 2px 2px rgba(0,0,0,.3inset;
    
box-shadow0 0 2px 2px rgba(0,0,0,.3inset;
}
 
nav li:first-child a {
    
border-left0;
    
/*Zaokrouhlení*/
    
-moz-border-radius4px 0 0 4px;
    -
webkit-border-radius4px 0 0 4px;
    
border-radius4px 0 0 4px;            
}

nav li:last-child a {
    
border-right0;
    
/*Zaokrouhlení*/
    
-moz-border-radius0 4px 4px 0;
    -
webkit-border-radius0 4px 4px 0;
    
border-radius0 4px 4px 0;            
}

Výsledek

css_menu

Podpora prohlížečů.

Menu by mělo fungovat ve všech prohlížečích. Ve starých verzích se odpojí některé vizualní efekty, ale to by němělo ovlivnit funkčnost.
css_menu

Zdroj: www.red-team-design.com/cool-css3-navigation-menu

Systém Orphus
Napište komentář.
Celkem komenrářů(26)
Haroreab - 2017-11-12  15:29:41
 Medrol Dose Pack No Prescription Cialis Generika Kaufen Rezeptfrei [url=http://orderviapills.com]viagra[/url] Amoxicillin Different Penecillin Seroquel
Haroreab - 2017-11-12  15:29:40
 Medrol Dose Pack No Prescription Cialis Generika Kaufen Rezeptfrei [url=http://orderviapills.com]viagra[/url] Amoxicillin Different Penecillin Seroquel
Haroreab - 2017-11-12  15:29:39
 Medrol Dose Pack No Prescription Cialis Generika Kaufen Rezeptfrei [url=http://orderviapills.com]viagra[/url] Amoxicillin Different Penecillin Seroquel
Haroreab - 2017-11-12  15:29:37
 Medrol Dose Pack No Prescription Cialis Generika Kaufen Rezeptfrei [url=http://orderviapills.com]viagra[/url] Amoxicillin Different Penecillin Seroquel
Haroreab - 2017-10-30  13:15:10
 How To Buy Shipped Ups Generic Progesterone 200mg Website [url=http://howtogetvia.com]viagra[/url] Foro Priligy Espana 500mg Lasix No Prescription Kwikmed
Haroreab - 2017-10-30  13:15:09
 How To Buy Shipped Ups Generic Progesterone 200mg Website [url=http://howtogetvia.com]viagra[/url] Foro Priligy Espana 500mg Lasix No Prescription Kwikmed
Haroreab - 2017-10-27  12:11:36
 Actu Viagra Medicament [url=http://cheapviafast.com]viagra[/url] Ceallas And Viag For Sale Ward Capsule Levitra Gratuit
Haroreab - 2017-10-27  12:11:34
 Actu Viagra Medicament [url=http://cheapviafast.com]viagra[/url] Ceallas And Viag For Sale Ward Capsule Levitra Gratuit
Haroreab - 2017-10-27  12:11:33
 Actu Viagra Medicament [url=http://cheapviafast.com]viagra[/url] Ceallas And Viag For Sale Ward Capsule Levitra Gratuit
Haroreab - 2017-10-27  12:11:32
 Actu Viagra Medicament [url=http://cheapviafast.com]viagra[/url] Ceallas And Viag For Sale Ward Capsule Levitra Gratuit
Haroreab - 2017-10-21  04:59:06
 Dostinex No Prescription [url=http://levitrial.com]levitra vs cialis[/url] Dutasteride Benign Prostatic Hyperplasia Where Can I Buy Prezzo Cialis Svizzera
Haroreab - 2017-10-21  04:59:05
 Dostinex No Prescription [url=http://levitrial.com]levitra vs cialis[/url] Dutasteride Benign Prostatic Hyperplasia Where Can I Buy Prezzo Cialis Svizzera
Haroreab - 2017-10-21  04:59:04
 Dostinex No Prescription [url=http://levitrial.com]levitra vs cialis[/url] Dutasteride Benign Prostatic Hyperplasia Where Can I Buy Prezzo Cialis Svizzera
Haroreab - 2017-10-21  04:59:02
 Dostinex No Prescription [url=http://levitrial.com]levitra vs cialis[/url] Dutasteride Benign Prostatic Hyperplasia Where Can I Buy Prezzo Cialis Svizzera
Jeffpoonia - 2017-10-20  23:46:36
 Viagra 25 Mg Efectos [url=http://cheapestcial.com ]cialis price[/url] Amoxicillin Suspension Ingredients
Haroreab - 2017-10-07  11:55:51
 Baclofene Mylan Buy Amoxicillin 500mg With Mastercard [url=http://levibuyus.com]brand cialis and levitra[/url] Cheap Discount Tadalis Sx
Haroreab - 2017-10-07  11:55:50
 Baclofene Mylan Buy Amoxicillin 500mg With Mastercard [url=http://levibuyus.com]brand cialis and levitra[/url] Cheap Discount Tadalis Sx
Haroreab - 2017-10-07  11:55:49
 Baclofene Mylan Buy Amoxicillin 500mg With Mastercard [url=http://levibuyus.com]brand cialis and levitra[/url] Cheap Discount Tadalis Sx
Haroreab - 2017-10-07  11:55:48
 Baclofene Mylan Buy Amoxicillin 500mg With Mastercard [url=http://levibuyus.com]brand cialis and levitra[/url] Cheap Discount Tadalis Sx
Haroreab - 2017-10-05  07:10:03
 Sildenafil For Men Amoxil Cheap Levitra Mas Alcohol [url=http://cheapvia50mg.com]viagra[/url] Levitra 5 Mg Preis Propanolol Next Day Delivery
[1] [2] 
*v komentářich nesmíte používat sprostá slova a odkazy!!!Děkuji za pochopeni.