Ayuda a que slides no me tape el menu
Publicado por CssAyuda (1 intervención) el 17/02/2019 11:16:53
¿ Me pueden ayudar a evitar que el slides me tape el menu y las redes sociales ? Dejo mi código
Archivo estilo.css
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
margin: 0;
padding: 0;
box-sizing: border-box;
background: #EAEAEC;
}
nav {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100px;
padding: 10px 100px;
box-sizing: border-box;
transition: 0.5s;
}
.social {
position: fixed;
top: 0;
right: 0;
float: right;
box-sizing: border-box;
text-align: center;
transition: .5s;
}
.social a {
transition: 0.5s;
}
.social {
margin: 10px 20px;
}
nav.menu-fixed {
background: rgba(38, 38, 38, .8);
height: 80px;
padding: 18px 40px;
}
nav ul {
float: left;
margin: 0;
padding: 0;
display: flex;
}
nav ul li {
list-style: none;
}
nav ul li a {
line-height: 30px;
color: #fff;
text-decoration: none;
padding: 8px 15px;
transition: 0.5s;
}
nav ul li a:hover {
background: #000;
}
.logo {
width: 100%;
}
.logo img {
width: 100%;
background-size: cover;
background-repeat: no-repeat;
height: 70vh;
}
.menu-responsive {
display: none;
}
.social .fa-google-plus-official{
background:#fff;
padding:8px;
border-radius:40%;
color:#0ff;
border:2px solid #d34836;
}
.social .fa-google-plus-official:hover{
background:#f0f;
padding:8px;
border-radius:50%;
color:#d34836;
border:2px solid #d34836;
}
.social .fa-facebook-square{
background:#f0f;
padding:8px;
border-radius:40%;
color:#d34836;
border:2px solid #3b5998;
}
.social .fa-facebook-square:hover{
background:#f0f;
padding:8px;
border-radius:50%;
color:#d34836;
border:2px solid #3b5998;
}
.social .fa-twitter-square{
background:#f0f;
padding:8px;
border-radius:40%;
color:#d34836;
border:2px solid #00aced;
}
.social .fa-twitter-square:hover{
background:#f0f;
padding:8px;
border-radius:50%;
color:#d34836;
border:2px solid #00aced;
}
.social .fa-instagram{
background:#f0f;
padding:8px;
border-radius:40%;
color:#d34836;
border:2px solid #2A5B83;
}
.social .fa-instagram:hover{
background:#f0f;
padding:8px;
border-radius:50%;
color:#d34836;
border:2px solid #2A5B83;
}
.social .fa-youtube-play{
background:#f0f;
padding:8px;
border-radius:40%;
color:#d34836;
border:2px solid #CC181E;
}
.menu .social .fa-youtube-play:hover{
background:#f0f;
padding:8px;
border-radius:50%;
color:#d34836;
border:2px solid #CC181E;
}
.slide{
position: relative;
margin: 0 auto;
}
.slide img{
position: absolute;
width: 100%;
height: 100%;
}
.fotos{
margin: 20px auto;
width: 70%;
background: #424242;
border: 2px solid black;
}
.fotos img{
width: 100%;
}
.slidesjs-pagination {
width: 100%;
background:#424242;
list-style:none;
overflow:hidden;
top: 10px;
}
.slidesjs-pagination li {
float:left;
}
.slidesjs-pagination li a{
display:block;
padding:10px 20px;
color:#fff;
text-decoration:none;
}
.slidesjs-pagination li a:hover{
background: rgba(255,255,255,0.7);
}
.fotos .active {
background:rgba(255,255,255,0.7);
}
.slidesjs-navigation{
background:#000;
color:#fff;
text-decoration:none;
display:inline-block;
display: none;
}
@media (max-width: 768px) {
.menu-responsive {
display: block;
width: 100%;
height: 60px;
background: #262626;
position: fixed;
top: 0;
left: 0;
padding: 8px 15px;
box-sizing: border-box;
z-index: 1;
}
.menu-responsive .icon-menu {
float: right;
margin: 0;
padding: 0;
color: #fff;
font-size: 30px;
margin: 10px 20px;
cursor: pointer;
}
nav,
nav.menu-fixed {
background: #262626;
height: 60px;
padding: 0;
}
nav ul {
position: absolute;
width: 100%;
top: 60px;
background: #262626;
float: none;
display: none;
left: 0;
}
header nav .menu ul.active {
display: block;
transition: 0.5s;
}
nav ul li a:hover {
background: rgba(0, 0, 0, .7);
color: #fff;
}
nav ul li {
width: 100%;
}
nav ul li a {
display: block;
padding: 0;
width: 100%;
text-align: center;
line-height: 35px !important;
color: #fff;
}
.menu-responsive .social {
margin: 10px 20px;
width: 70%;
left: 0;
}
.social-responsive{
display: none;
float: none;
}
}
@media (min-width:1024px) {
header .cabecera,{
width: 1000px;
margin: auto;
}
}
@media (max-width:425px) {
.menu-responsive a {
font-size: 1rem;
}
.menu ul li a {
font-size: 1.5rem;
}
}
@media (min-width:768px) {
.banner {
height: 430px;
overflow: hidden;
}
.banner img {
height: auto;
}
}
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" type="text/css" href="css/estilo.css" media="screen">
<link rel="stylesheet" type="text/css" href="css/font-awesome.css" media="screen">
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css" media="screen">
<link rel="stylesheet" type="text/css" href="css/rrss.css" media="screen">
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css" media="screen">
<link rel="stylesheet" type="text/css" href="css/fontello.css">
<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
</head>
<body>
<header>
<div class="menu-responsive">
<label id="menuicon" class="icon1 icon-menu"></label>
<br>
<div class="social">
<a href="https://es-es.facebook.com/"><i class="fa fa-facebook-square" aria-hidden="true"></i></a>
<a href="https://twitter.com/"><i class="fa fa-twitter-square" aria-hidden="true"></i></a>
<a href="https://www.instagram.com/"><i class="fa fa-instagram" aria-hidden="true"></i></a>
</div>
</div>
<div class="cabecera">
<div class="cabeceramedia">
<nav>
<div class="menu">
<ul>
<li class="inicio "><a class="active" href="">INICIO</a></li>
<li class="inicio"> <a href="">INICIO</a></li>
<li class="inicio"><a href="">INICIO </a></li>
<li class="inicio"><a href="">INICIO</a></li>
</ul>
</div>
</nav>
</div>
<div class="social">
<a href="https://plus.google.com/"><i class="fa fa-google-plus-official" aria-hidden="true"></i></a>
<a href="https://es-es.facebook.com/"><i class="fa fa-facebook-square" aria-hidden="true"></i></a>
<a href="https://twitter.com/"><i class="fa fa-twitter-square" aria-hidden="true"></i></a>
<a href="https://www.instagram.com/"><i class="fa fa-instagram" aria-hidden="true"></i></a>
<a href="https://www.youtube.com/"><i class="fa fa-youtube-play" aria-hidden="true"></i></a>
</div>
</div>
<div class="banner">
<div class="logo">
<img src="imagenes/2.jpg" title="" alt="">
</div>
</div>
</header>
<div class="slide">
<div class="fotos">
<img src="imagenes/1.jpg" alt="">
<img src="imagenes/1.jpg" alt="">
<img src="imagenes/1.jpg"alt="">
<img src="imagenes/1.jpg"alt="">
<img src="imagenes/1.jpg" alt="">
</div>
</div>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="js/jquery.slides.js"></script>
<script>
$(function(){
$(".fotos").slidesjs({
play: {
active: true,
// [boolean] Generate the play and stop buttons.
// You cannot use your own buttons. Sorry.
effect: "slide",
// [string] Can be either "slide" or "fade".
interval: 3000,
// [number] Time spent on each slide in milliseconds.
auto: true,
// [boolean] Start playing the slideshow on load.
swap: true,
// [boolean] show/hide stop and play buttons
pauseOnHover: false,
// [boolean] pause a playing slideshow on hover
restartDelay: 2500
// [number] restart delay on inactive slideshow
}
});
});
$(window).on('scroll', function() {
if ($(window).scrollTop()) {
$('nav').addClass('menu-fixed');
} else {
$('nav').removeClass('menu-fixed');
}
});
$(document).ready(function() {
$("#menuicon").click(function() {
$("nav .menu ul").toggleClass("active");
})
});
</script>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</body>
</html>
Archivo estilo.css
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
margin: 0;
padding: 0;
box-sizing: border-box;
background: #EAEAEC;
}
nav {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100px;
padding: 10px 100px;
box-sizing: border-box;
transition: 0.5s;
}
.social {
position: fixed;
top: 0;
right: 0;
float: right;
box-sizing: border-box;
text-align: center;
transition: .5s;
}
.social a {
transition: 0.5s;
}
.social {
margin: 10px 20px;
}
nav.menu-fixed {
background: rgba(38, 38, 38, .8);
height: 80px;
padding: 18px 40px;
}
nav ul {
float: left;
margin: 0;
padding: 0;
display: flex;
}
nav ul li {
list-style: none;
}
nav ul li a {
line-height: 30px;
color: #fff;
text-decoration: none;
padding: 8px 15px;
transition: 0.5s;
}
nav ul li a:hover {
background: #000;
}
.logo {
width: 100%;
}
.logo img {
width: 100%;
background-size: cover;
background-repeat: no-repeat;
height: 70vh;
}
.menu-responsive {
display: none;
}
.social .fa-google-plus-official{
background:#fff;
padding:8px;
border-radius:40%;
color:#0ff;
border:2px solid #d34836;
}
.social .fa-google-plus-official:hover{
background:#f0f;
padding:8px;
border-radius:50%;
color:#d34836;
border:2px solid #d34836;
}
.social .fa-facebook-square{
background:#f0f;
padding:8px;
border-radius:40%;
color:#d34836;
border:2px solid #3b5998;
}
.social .fa-facebook-square:hover{
background:#f0f;
padding:8px;
border-radius:50%;
color:#d34836;
border:2px solid #3b5998;
}
.social .fa-twitter-square{
background:#f0f;
padding:8px;
border-radius:40%;
color:#d34836;
border:2px solid #00aced;
}
.social .fa-twitter-square:hover{
background:#f0f;
padding:8px;
border-radius:50%;
color:#d34836;
border:2px solid #00aced;
}
.social .fa-instagram{
background:#f0f;
padding:8px;
border-radius:40%;
color:#d34836;
border:2px solid #2A5B83;
}
.social .fa-instagram:hover{
background:#f0f;
padding:8px;
border-radius:50%;
color:#d34836;
border:2px solid #2A5B83;
}
.social .fa-youtube-play{
background:#f0f;
padding:8px;
border-radius:40%;
color:#d34836;
border:2px solid #CC181E;
}
.menu .social .fa-youtube-play:hover{
background:#f0f;
padding:8px;
border-radius:50%;
color:#d34836;
border:2px solid #CC181E;
}
.slide{
position: relative;
margin: 0 auto;
}
.slide img{
position: absolute;
width: 100%;
height: 100%;
}
.fotos{
margin: 20px auto;
width: 70%;
background: #424242;
border: 2px solid black;
}
.fotos img{
width: 100%;
}
.slidesjs-pagination {
width: 100%;
background:#424242;
list-style:none;
overflow:hidden;
top: 10px;
}
.slidesjs-pagination li {
float:left;
}
.slidesjs-pagination li a{
display:block;
padding:10px 20px;
color:#fff;
text-decoration:none;
}
.slidesjs-pagination li a:hover{
background: rgba(255,255,255,0.7);
}
.fotos .active {
background:rgba(255,255,255,0.7);
}
.slidesjs-navigation{
background:#000;
color:#fff;
text-decoration:none;
display:inline-block;
display: none;
}
@media (max-width: 768px) {
.menu-responsive {
display: block;
width: 100%;
height: 60px;
background: #262626;
position: fixed;
top: 0;
left: 0;
padding: 8px 15px;
box-sizing: border-box;
z-index: 1;
}
.menu-responsive .icon-menu {
float: right;
margin: 0;
padding: 0;
color: #fff;
font-size: 30px;
margin: 10px 20px;
cursor: pointer;
}
nav,
nav.menu-fixed {
background: #262626;
height: 60px;
padding: 0;
}
nav ul {
position: absolute;
width: 100%;
top: 60px;
background: #262626;
float: none;
display: none;
left: 0;
}
header nav .menu ul.active {
display: block;
transition: 0.5s;
}
nav ul li a:hover {
background: rgba(0, 0, 0, .7);
color: #fff;
}
nav ul li {
width: 100%;
}
nav ul li a {
display: block;
padding: 0;
width: 100%;
text-align: center;
line-height: 35px !important;
color: #fff;
}
.menu-responsive .social {
margin: 10px 20px;
width: 70%;
left: 0;
}
.social-responsive{
display: none;
float: none;
}
}
@media (min-width:1024px) {
header .cabecera,{
width: 1000px;
margin: auto;
}
}
@media (max-width:425px) {
.menu-responsive a {
font-size: 1rem;
}
.menu ul li a {
font-size: 1.5rem;
}
}
@media (min-width:768px) {
.banner {
height: 430px;
overflow: hidden;
}
.banner img {
height: auto;
}
}
Valora esta pregunta


0