
Como hacer un Submenu
Publicado por Eduardo (2 intervenciones) el 28/01/2016 16:24:34
Buenas tardes a todos,
Tengo este menú despegable me gustaría hacer que el botón Desarrollo2 abriera un submenus con 3 botones mas, me puede que putas tengo que seguir o como hacerlo.
Muchas Gracias
Código HTML:
CSS:
Tengo este menú despegable me gustaría hacer que el botón Desarrollo2 abriera un submenus con 3 botones mas, me puede que putas tengo que seguir o como hacerlo.
Muchas Gracias
Código HTML:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Menú desplegable con HTML5 y CSS3</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href="style_menu.css" rel="stylesheet" type="text/css" />
<link href='http://fonts.googleapis.com/css?family=Raleway:400,500,600' rel='stylesheet' type='text/css'>
</head>
<body>
<header>
<h1 id="logo"><img src="img/logo-campusMVP.png" /></h1>
<nav id="navigation">
<div class="control-menu">
<a href="#navigation" class="open"><span>MENU</span></a>
<a href="#" class="close"><span>CERRAR</span></a>
</div>
<ul class="nav-items">
<li id="Web-Dev"><a href="#Desarrollo1"> <span>Desarrollo1</span></a></li>
<li id="Mobile"><a href="#Desarrollo2"><span>Desarrollo2</span></a></li>
<li id="Data"><a href="#Acceso a datos"><span>Acceso a datos</span></a></li>
<li id="Net-VS"><a href="#Visual Studio y Plataforma.NET"><span> Visual Studio y Plataforma.NET</span></a></li>
<li id="SharePoint"><a href="#Todo sobre Sharepoint"><span>Todo sobre Sharepoint</span></a></li>
</ul>
</nav>
</header>
<div id="central-content">
<!--Aquí va el contenido de tu página--></div>
</body>
</html>
CSS:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
* {
margin: 0; padding: 0;}body {background: #ddd none repeat scroll 0 0;
font-family: "Raleway",Arial,sans-serif;
}a {color: #222;
text-decoration: none;
}ul, ol, li {
list-style: outside none none;
}header, #central-content {
box-sizing: border-box;
margin: 0 auto;max-width: 500px;
width: 100%;
}header {background: rgba(0, 0, 0, 0) linear-gradient(to bottom, rgba(59, 89, 151, 1) 0%, rgba(41, 62, 107, 1) 100%) repeat scroll 0 0;
box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.5);
padding: 0.8em 0 0;
}header h1 { float: left;padding: 0 0 0.2em;
}header h1#logo img {
height: 40px;margin-left: 0.5em;
}.control-menu {
background-color: transparent;
background-position: center center;
border: 1px solid #fff;
display: block; float: right; height: 40px;margin-right: 1.3em;
width: 40px;}.control-menu a span {
display: inline-block;
height: 40px;text-indent: -9999px;
width: 40px;}.control-menu .close {
background-image: url("img/close-menu.png");
background-position: center center;
background-repeat: no-repeat;
display: none;}.control-menu .open {
background-image: url("img/open-menu.png");
background-position: center center;
background-repeat: no-repeat;
display: block;}ul.nav-items {
clear: both; height: 0; overflow: hidden;transition: height 0.4s ease-in-out 0s, background-color 2s ease 0s; /*El menú cambia su altura y su color de fondo mediante una transición suavizada al voover a su estado unicial*/
}#navigation:target ul.nav-items {
background: #f0f0f0 none repeat scroll 0 0;
height: 15.8em;
transition: height 0.4s ease-in-out 0s, background-color 0.9s ease 0s; /*El menú cambia su altura y su color de fondo mediante una transición suavizada al abrirse*/
}/*Al hacer clic sobre el enlace que abre el menú éste desaparece*/.close {
display:none;}#navigation:target .open {
display: none;}/* Al hacer clic sobre el enlace que abre el menú aparece el enlace .close que previamente estaba oculto*/#navigation:target .close {
display: block;}/*Estilos menu*/ul.nav-items li {
display: block;}ul.nav-items a {
border-top: 2px dotted #dddbdb;
color: #333;
display: block; height: 3em;line-height: 3em;
margin: 0 1.3em;
}ul.nav-items li:first-child a {
border-top: 2px solid transparent;
}ul.nav-items li a span {
border-left: 3px solid;
height: 3.2em;
padding: 0.4em 0.5em;
}#Web-Dev a span {
border-color: #ff6633;
}#Mobile a span {
border-color: #bda94d;
}#Data a span {
border-color: #5887bc;
}#Net-VS a span {
border-color: #00a2b7;
}#SharePoint a span {
border-color: #639bf2;
}Valora esta pregunta


0
