HTML - Imagen de fondo html y css

 
Vista:
sin imagen de perfil
Val: 1
Ha aumentado su posición en 41 puestos en HTML (en relación al último mes)
Gráfica de HTML

Imagen de fondo html y css

Publicado por sebastian (1 intervención) el 30/03/2020 20:32:39
Buenas tardes, necesito ver si alguien me puede ayudar.. por mas que intento no se como agregar una imagen de fondo al codigo. he intentado varias formas y no hay caso. no soy experto en html, solo me manejo un poco
este es el codigo. estare atento, gracias de antemano.

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
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Luckup | KrayserthoR</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/bxslider/4.2.12/jquery.bxslider.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  <script src="https://cdn.jsdelivr.net/bxslider/4.2.12/jquery.bxslider.min.js"></script>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
  <link rel="stylesheet" href="css/style.css">
 
 
</head>
<body>
 
<!-- MAIN WRAPPER -->
  <div id="wrapper">
 
    <!-- BANNER WRAPPER -->
    <div id="banner-wrapper">
      <header>
        <div id="header-inner">
          <a href="#" id="logo">
            <img src="img/pics/logo.png" alt="">
          </a>
 
          <nav>
            <a href="#" id="menu-icon">
              <i class="fa fa-bars"></i>
            </a>
            <ul>
              <li>
                <a href="index.html" class="current">
                  Home
                </a>
              </li>
              <li>
                <a href="Noticias.html">
                  Noticias
                </a>
              </li>
              <li>
                <a href="#Juegos">
                  Juegos
                </a>
              </li>
              <li>
                <a href="#Descargas">
                  Cine
                </a>
              </li>
              <li>
                <a href="#contacto">
                  Contacto
                </a>
              </li>
            </ul>
          </nav>
        </div>
      </header>
      <!-- SLIDER -->
      <div id="slide-wrap">
        <section class="slider">
          <ul class="slider1">
            <li><img src="img/slider/slider1.jpg" alt=""></li>
            <li><img src="img/slider/slider2.jpg" alt=""></li>
            <li><img src="img/slider/slider3.jpg" alt=""></li>
 
          </ul>
          </section>
      </div>
    </div>
 
    <!-- ICONS -->
    <section class="one-third" id="skills">
      <div class="icon-wrap">
        <i class="fa fa-desktop"></i>
      </div>
      <h3>Noticias</h3>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Provident praesentium voluptas, hic quia veritatis eaque ipsam. Pariatur itaque repellat dolor tempore aut recusandae, consectetur ad.</p>
    </section>
    <section class="one-third">
      <div class="icon-wrap">
        <i class="fa fa-puzzle-piece"></i>
      </div>
      <h3>Juegos</h3>
      <p>Reviews de juegos pc, consolas, zona de descarga torrent.</p>
    </section>
    <section class="one-third">
      <div class="icon-wrap">
        <i class="fa fa-video-camera"></i>
      </div>
      <h3>Cine</h3>
      <p>Comentarios de cine, recomendaciones de peliculas, estrenos imperdibles, peliculas de culto.</p>
    </section>
 
    <div class="clearfix-padding"></div>
    <!-- LEFT COL -->
    <section class="left-col" id="portfolio">
      <h3>Portfolio</h3>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
    </section>
    <section class="sidebar">
      <img src="img/pics/logo.png">
    </section>
 
    <div class="clearfix-padding"></div>
    <!-- INFO THUMBNAILS -->
    <div class="one-third-padding" id="services">
      <h3>Numero1</h3>
      <img src="img/pics/fort2.png" alt="">
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nobis assumenda provident recusandae deserunt aperiam laboriosam distinctio sed itaque quas maxime!</p>
    </div>
    <div class="one-third-padding">
      <h3>Numero2</h3>
      <img src="img/pics/image2.png" alt="">
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nobis assumenda provident recusandae deserunt aperiam laboriosam distinctio sed itaque quas maxime!</p>
    </div>
    <div class="one-third-padding">
      <h3>Numero3</h3>
      <img src="img/pics/foto1  .png" alt="">
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nobis assumenda provident recusandae deserunt aperiam laboriosam distinctio sed itaque quas maxime!</p>
    </div>
  </div>
  <div class="clearfix-padding"></div>
  <!-- FOOTER -->
  <footer>
    <div class="banner-wrapper">
      <div class="icon-text">
        <div class="icon-text-icon">
          <ul class="footer-nav">
            <li>
              <a href="index.html">Home</a>
            </li>
            <li>
              <a href="#">Noticias</a>
            </li>
            <li>
              <a href="#">Juegos</a>
            </li>
            <li>
              <a href="#">Cine</a>
            </li>
            <li>
              <a href="#">Contacto</a>
            </li>
          </ul>
        </div>
        <div class="icon-text-text">
          <ul class="social">
            <li>
              <a href="http://www.hotmail.com"target="blank">
                <i class="fa fa-envelope-o"></i>
              </a>
            </li>
            <li>
              <a href="http://facebook.com"target="blank">
                <i class="fa fa-facebook"></i>
              </a>
            </li>
            <li>
              <a href="http://twitter.com"target="blank">
                <i class="fa fa-twitter"></i>
              </a>
            </li>
            <li>
              <a href="https://www.youtube.com/channel/UCXcL692VCR0IkrQ17KXPxaQ" target="blank">
                <i class="fa fa-youtube"></i>
              </a>
            </li>
            <li>
              <a href="#">
                <i class="fa fa-instagram"></i>
              </a>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </footer>
  <footer class="second-footer">
    <p>
      &copy; Krayserthor</a>
    </p>
  </footer>
 
  <!-- SCRIPTS -->
  <script>
    $(document).ready(function(){
      $('.slider1').bxSlider({
        mode: 'fade',
      });
      $('.slider2').bxSlider({
        mode: 'fade',
      });
      $('.slider3').bxSlider({
        mode: 'fade',
      });
    });
  </script>
</body>
</html>


y este es el 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
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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
{
  margin: 0;
  padding: 0;
  border: 0;
}
 
body {
  background-color: rgba(0, 0, 0, 0.993);
 
}
 
p {
  color: #d9cde0;
  font-size: 160%;
  line-height: 155%;
  padding: 3%;
  text-indent: 2%;
  text-align: justify;
}
 
h3 {
  font-size: 175%;
  line-height: 155%;
  font-weight: 500;
  color: #524c56;
  text-align: center;
  text-transform: uppercase;
  padding: 0;
}
 
a {
  color: #524c56;
  text-decoration: none;
  font-weight: bold;
}
a:hover {
  color: #c3d7df;
}
 
img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  width: auto;
  margin-bottom: -4px;
}
 
#wrapper {
  max-width: 1200px;
  margin: 0 auto;
}
 
#banner-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0 3% 0;
}
 
header {
  width: 100%;
  height: 100px;
  top: 0;
  left: 0;
}
 
header #logo img{
  margin: 20px;
  float: left;
  width: 50px;
}
 
/* NAVIGATION*/
nav {
  float: right;
  padding: 25px 20px 0px 0px;
}
 
#menu-icon {
  display: none;
  font-size: 50px;
}
 
ul {
  list-style: none;
}
 
nav ul li {
  font-size: 150%;
  display: inline-block;
  padding: 10px;
}
 
nav ul li a {
  color: rgb(134, 6, 6);
}
 
.current {
  color: #3F5767;
}
 
a:hover {
  color: #a5bdcd;
}
/*
.slider {
  max-width: 1200px;
}
.slider img {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}*/
 
.one-third {
  width: 31.5%;
  float: left;
  padding: 10px;
  text-align: center;
}
 
.icon-wrap {
  margin: 0 auto;
  width: 120px;
  height: 120px;
  background-color: #6991ac;
  border-radius: 125px;
  text-align: center;
  margin-top: 3%;
}
 
.icon-wrap i {
  text-align: center;
  color: #ffffff;
  font-size: 450%;
  padding: 20%;
}
 
/* SECTION 2*/
.left-col {
  float: left;
  margin: 0 auto;
  width: 60%;
  height: auto;
  padding: 1%;
}
 
.sidebar {
  float: right;
  margin: 0 auto;
  width: 32%;
  height: auto;
  padding: 1%;
}
 
/* ONE THIRD PADDING*/
.one-third-padding {
  width: 29%;
  float: left;
  margin: 2% 2%;
}
 
.clearfix-padding {
  clear: both;
  padding: 2%;
}
 
footer {
  background: #2c3e50;
  width: 100%;
  overflow: auto;
}
.icon-text {
  width: 100%;
  margin: 0 auto;
}
 
.icon-text-icon {
  float: left;
  width: 20%;
  padding: 4%;
}
.icon-text-text {
  float: left;
  width: 60%;
  padding: 4% 4% 2% 0;
  font-size: 100%
}
 
.footer-nav {
  text-align: right;
}
 
.footer-nav a {
  font-size: 160%;
  color: #c3d7df;
  font-weight: 300;
}
 
.footer-nav a:hover {
  color: #f5f5f5;
}
 
.social {
  list-style-type: none;
  text-align: center;
}
 
.social li {
  display: inline;
}
 
.social i {
  font-size: 420%;
  margin: 1%;
  padding: 5%;
  color: #c3d7df;
}
 
.social i:hover {
  color: #f5f5f5;
}
 
footer.second {
  border-top: 1px solid #aadcd2;
  text-align: center;
  margin: 0;
}
footer.second p, .second a {
  text-align: center;
  color: #fff;
  font-size: 160%;
  line-height: 155%;
}
 
@media screen and (max-width: 768px) {
  p {
    font-size: 130%;
  }
  h3 {
    font-size: 150%;
  }
  header {
    height: 80px;
    position: relative;
  }
  header #logo {
    margin: 15px 0 20px -25px;
  }
 
  #menu-icon {
    display: inline-block;
  }
 
  nav:hover ul {
    display: block;
  }
 
  nav ul, nav:active ul {
    display: none;
    z-index: 1000;
    position: absolute;
    padding: 20px;
    background: #c52222;
    border: 1px solid #a5bdcd;
    right: 20px;
    width: 30%;
    opacity: .95;
  }
  nav li {
    text-align: center;
    width: 100%;
  }
 
  .one-third {
    float: left;
    width: 100%;
 
  }
  .icon-wrap {
    height: 80px;
    width: 80px;
    margin-top: 3%;
  }
 
  .icon-wrap i {
    font-size: 250%;
    padding-top: 27%;
  }
 
  .left-col {
    width: 100%;
    padding: 0;
  }
 
  .sidebar {
    width: 100%;
  }
 
  .one-third-padding {
    width: 98%;
    margin: 0;
    padding: 1%;
  }
 
  .icon-text-icon {
    width: 100%;
    padding: 0 0 2% 0;
  }
 
  .icon-text-text {
    width: 100%;
    padding: 2% 0 0 0;
    font-size: 80%;
  }
 
  .footer-nav {
    margin: 0 auto;
    text-align: center;
    padding: 5%;
  }
 
  .footer-nav li {
    padding: 1%;
  }
 
}
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de ScriptShow
Val: 359
Bronce
Ha mantenido su posición en HTML (en relación al último mes)
Gráfica de HTML

Imagen de fondo html y css

Publicado por ScriptShow (409 intervenciones) el 03/04/2020 23:48:58
Saludos,

para una imagen de fondo, no se precisan librerías de terceros. Con algo de código nativo compatible, es suficiente...

Veamos una opción posible, adaptable:

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
<!DOCTYPE html>
 
<html>
<head>
<title>Full Background</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<style type="text/css">
* {
margin:0px;
padding:0px;
border:0px;
outline:0px;
}
html, body {
width:100%;
height:100%;
display:block;
overflow:auto;
background:transparent url("fondo.jpg") no-repeat center center fixed;
-webkit-background-size:cover;
-moz-background-size:cover;
-ms-background-size:cover;
-o-background-size:cover;
background-size:cover;
}
</style>
</head>
<body>
<h2>Título del Sitio</h2>
</body>
</html>

Espero sea útil.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar