Как сделать section на всю высоту экрана, работаю в bootstrap
16.10.2016, 12:52. Показов 9793. Ответов 5
Такая вот проблемка, скачал себе на локальный сервер бесплатный готовый шаблон bootstrap, вот он http://blacktie.co/2013/11/sma... lio-theme/ эта страница поделена на три секции, каждая из них занимает всю высоту экрана, я бы хотел чуть чуть изменить эту страницу и добавить еще три секции. В исходниках в файле index я скопировал вторую секцию, она получается по середине. и вставил ее три раза в конце файла, у меня как я и хотел получилось шесть секций. Но не совсем так как я хотел теперь у меня есть три секции которые не занимают высоту моего экрана, почему они не в всю высоту экрана? Ведь стили проставлены изначально я просто скопировал секцию с имеющимся id и классом. id на странице должен быть только один, может в этом дело менял id у других секций, но не помогло, где проставить высоту незнаю, может это где то в java script?
вот index.html
HTML5 | 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
| <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="assets/ico/favicon.png">
<title>Small - Free Bootstrap 3 Theme</title>
<!-- Bootstrap core CSS -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="assets/css/main.css" rel="stylesheet">
<link href="assets/css/font-awesome.min.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="nav">
<a href="index.html#hero" class="scroll">section one</a>
<a href="index.html#work" class="scroll">section two</a>
<a href="index.html#networks" class="scroll">section three</a>
</div>
<section id="hero">
<div class="hero-block">
<img class="img-circle" src="assets/img/logo.png" width="200" height="200" class="mb-7 hero-image">
<p>Hello, I'm Carlos and this is our new theme, Small.<br/>
It is extremely easy to configure and use. Designed to show your Dribbble shots.<br/>
No complex stuff. Your logo, your shots your social links. Easy stuff!</p>
</div>
<a href="index.html#work" class="scroll"><span class="down-arrow"></span></a>
</section>
<section id="work">
<div class="showcase">
<div class="showcase-tiles">
<ul class="slides">
<!--Dribbble feed-->
</ul>
</div>
<div class="showcase-info">
<h2 class="mb-7">Follow me on Dribbble!</h2>
</div>
</div>
</section>
<section id="networks">
<div class="container">
<p>
<a href="#"><i class="dribbble fa fa-dribbble"></i></a><a href="#"><i class="facebook fa fa-facebook"></i></a><a href="#"><i class="twitter fa fa-twitter"></i></a><a href="#"><i class="mail fa fa-envelope"></i></a>
</p>
</div>
</section>
<section id="work1">
<div class="showcase">
<div class="showcase-tiles">
<ul class="slides">
<!--Dribbble feed-->
</ul>
</div>
<div class="showcase-info">
<h2 class="mb-7">Follow me on Dribbble!</h2>
</div>
</div>
</section>
<section id="work2">
<div class="showcase">
<div class="showcase-tiles">
<ul class="slides">
<!--Dribbble feed-->
</ul>
</div>
<div class="showcase-info">
<h2 class="mb-7">Follow me on Dribbble!</h2>
</div>
</div>
</section>
<section id="work3">
<div class="showcase">
<div class="showcase-tiles">
<ul class="slides">
<!--Dribbble feed-->
</ul>
</div>
<div class="showcase-info">
<h2 class="mb-7">Follow me on Dribbble!</h2>
</div>
</div>
</section>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/jribbble.js"></script>
<script src="assets/js/site-ck.js"></script>
</body>
</html> |
|
вот css файл main.css
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
| /*
* Author: Carlos Alvarez
* URL: [url]http://alvarez.is[/url]
*
* Project Name: Small - Free Bootstrap 3 Theme
* Version: 1.0
* URL: [url]http://blacktie.co[/url]
*/
/* FONTS */
@import url([url]http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,800italic,400,700,800);[/url]
body {
font-family: 'Open Sans', sans-serif;
background: #f5f6f7;
color: #f5f6f7;
font-size: 20px;
line-height: 36px;
text-align: center;
font-weight: 300; }
nav ul {
list-style: none; }
blockquote, q {
quotes: none; }
blockquote:before, blockquote:after, q:before, q:after {
content: none; }
hr {
display: block;
height: 1px;
border: 0;
border-top: 1px solid #ccc;
margin: 1em 0;
padding: 0; }
/* =========================
GENERAL STYLES
=========================*/
*, *:before, *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
border: none; }
a:link,
a:visited,
a:active {
font-weight: 600;
color: #f5f6f7;
text-decoration: none; }
a:link:hover,
a:visited:hover,
a:active:hover {
color: #e1e1e1;
-webkit-transition: color 1s;
-moz-transition: color 1s;
-ms-transition: color 1s;
-o-transition: color 1s;
transition: color 1s; }
.nav {
position: fixed;
width: 30px;
height: 84px;
z-index: 100;
right: 0;
top: 50%;
margin-top: -42px; }
.nav a {
text-indent: -9999px;
display: block;
width: 14px;
height: 14px;
background: rgba(245, 246, 247, 0.4);
-webkit-border-radius: 7px;
-moz-border-radius: 7px;
border-radius: 7px;
margin-bottom: 20px;
-webkit-transition: background 0.5s;
-moz-transition: background 0.5s;
-ms-transition: background 0.5s;
-o-transition: background 0.5s;
transition: background 0.5s; }
.nav a:hover {
background: #f5f6f7;
-webkit-transition: background 1s;
-moz-transition: background 1s;
-ms-transition: background 1s;
-o-transition: background 1s;
transition: background 1s; }
.mb-7 {
margin-bottom: 70px; }
.centered {
text-align: center;
}
/* =========================
SECTION STYLES
=========================*/
#hero,
#work,
#networks {
position: relative; }
#work2, #work3, #work1 {
position: relative; }
.hero-block,
.footer-block {
height: 390px;
width: 100%;
position: absolute;
top: 50%;
margin-top: -195px; }
.hero-image {
width: auto;
height: auto; }
.footer-block {
height: 180px;
margin-top: -90px; }
#hero {
background: #1abc9c; }
#work {
background: #3498db; }
#work2, #work3, #work1 {
background: #3498db; }
#networks {
background: #474e5d; }
.down-arrow {
position: absolute;
bottom: 70px;
left: 50%;
margin-left: -12px;
width: 25px;
height: 14px;
background: url("../img/arrow.png") no-repeat; }
/* =========================
WORK
=========================*/
#work .showcase {
width: 100%;
padding: 0px;
}
#work2 .showcase {
width: 100%;
padding: 0px;
}
#work3 .showcase {
width: 100%;
padding: 0px;
}
#work1 .showcase {
width: 100%;
padding: 0px;
}
.showcase-tiles {
padding-top: 0px;
margin-top: 0px;
display: table-row; }
.showcase-info {
display: table-row; }
.showcase-info {
text-align: center; }
/* =========================
DRIBBBLE FEED
=========================*/
.d-hover {
display: none;
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
text-align: center;
padding-top: 25%;
line-height: 20px;
background: rgba(231, 76, 60, 0.9); }
.d-hover p {
display: block !important;
z-index: 500;
margin-top: 25px;
font-size: 14px;
font-style: italic;
font-weight: 300; }
ul.slides {
line-height: 0px;
padding: 0px; }
ul.slides li {
display: inline-block;
width: 25%; }
ul.slides li a {
display: block;
width: 100%;
height: 100%;
position: relative; }
ul.slides li a:hover .d-hover {
display: block; }
ul.slides li a img {
width: 100%; }
ul.slides li a p {
display: none; }
ul, menu, dir {
display: block;
list-style-type: disc;
-webkit-margin-before: 0px;
-webkit-margin-after: 0px;
-webkit-margin-start: 0px;
-webkit-margin-end: 0px;
-webkit-padding-start: 0px;
}
@media only screen and (max-width: 1000px) {
ul.slides li {
width: 33%; } }
@media only screen and (max-width: 767px) {
ul.slides li {
width: 50%; } }
ul.slides li a {
display: block;
width: 100%;
height: 100%;
position: relative; }
ul.slides li a:hover .d-hover {
display: block; }
ul.slides li a img {
width: 100%; }
ul.slides li a p {
display: none; }
/* =========================
FOOTER
=========================*/
#networks {
width: 100%;
height: 100%;
padding-top: 200px;
}
#networks i {
font-size: 60px;
color: white;
padding: 18px;
}
#networks .dribbble:hover {
color: #ed6297;
}
#networks .facebook:hover {
color: #3b5998;
}
#networks .twitter:hover {
color: #2094CA;
}
#networks .mail:hover {
color: #f39c12;
} |
|
вот site-ck.js
Javascript | 1
2
3
| /* Dribbble Shots using Jribbble plugin */$(document).ready(function(){$.jribbble.getShotsByPlayerId("powdah",function(e){var t=[];$.each(e.shots,function(e,n){t.push('<li><a href="'+n.url+'">');t.push('<img src="'+n.image_url+'" ');t.push('alt="'+n.title+'"><span class="d-hover">'+n.title+"<p>view on dribbble</p></span></a></li>")});$(".slides").html(t.join(""))},{page:1,per_page:8})});$(function(){$(".service").hover(function(){$("#networks").addClass($(this).data("network")).addClass("active");$("#networks p").html($(this).data("tip"))},function(){$("#networks").removeClass();$("#networks p").html("You can find me all over the web")})});jQuery(document).ready(function(){$("#hero").height($(window).height());$(window).resize(function(){$("#hero").height($(window).height());$("#hero").css("min-height","600px")});$("#work").height($(window).height());$(window).resize(function(){$("#work").minHeight($(window).height());$(".showcase-info").css("min-height","360px")});$("#networks").height($(window).height());$(window).resize(function(){$("#networks").height($(window).height());$("#networks").css("min-height","600px")})});jQuery(document).ready(function(e){e(".scroll").click(function(t){t.preventDefault();e("html,body").animate({scrollTop:e(this.hash).offset().top},1e3)})});
/*Change, in the first line the username "powdah" with your dribbble username. That's all */ |
|
и jribbble.js
Javascript | 1
| (function(e){"use strict";e.jribbble={};var t=function(t,s){e.ajax({type:"GET",url:"http://api.dribbble.com"+t,data:s[1]||{},dataType:"jsonp",success:function(e){e===undefined?s[0]({error:!0}):s[0](e)}})},s={getShotById:"/shots/$/",getReboundsOfShot:"/shots/$/rebounds/",getShotsByList:"/shots/$/",getShotsByPlayerId:"/players/$/shots/",getShotsThatPlayerFollows:"/players/$/shots/following/",getPlayerById:"/players/$/",getPlayerFollowers:"/players/$/followers/",getPlayerFollowing:"/players/$/following/",getPlayerDraftees:"/players/$/draftees/",getCommentsOfShot:"/shots/$/comments/",getShotsThatPlayerLikes:"/players/$/shots/likes/"},o=function(e){return function(){var s=[].slice.call(arguments),o=e.replace("$",s.shift());t(o,s)}};for(var r in s)e.jribbble[r]=o(s[r])})(jQuery,window,document); |
|
есть еще boottrap.min.js и bootsrap.min.css
и файл под названием font-awesome.min
плиз помогите. очень прошу. извинеите если я не в ту тему написал, мне кажеться здесь проблема в цсс поэтому сюда написал, но также возможно что надо в js что то изменить..
0
|