Divy pojawiają się na stronie dzięki skryptowi JS.
Jednak są one o różnych rozmiarach.
Pliki:
HTML (index.html):
CSS (main.css):
Kod
*{
margin: 0px;
padding: 0px;
}
body{/*
width: 100%;
height: 100%;*/
background: #E7EBEE;
}
.moz{
width: 10%;
height: 10%;
margin: 5px;
border-radius: 15px;
background: #BECBD1;
display: inline-block;
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
box-sizing: border-box; /* Opera/IE 8+ */
}
margin: 0px;
padding: 0px;
}
body{/*
width: 100%;
height: 100%;*/
background: #E7EBEE;
}
.moz{
width: 10%;
height: 10%;
margin: 5px;
border-radius: 15px;
background: #BECBD1;
display: inline-block;
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
box-sizing: border-box; /* Opera/IE 8+ */
}
JS(js.js):
Kod
function prepare_page(){
createSlides();
}
function createSlides(){
for(var i=1;i<=100;i++){
document.write('<div class="moz" id="'+ i +'">nr: '+ i +'</div>');
}
}
createSlides();
}
function createSlides(){
for(var i=1;i<=100;i++){
document.write('<div class="moz" id="'+ i +'">nr: '+ i +'</div>');
}
}
+
screenshot wyniku (z zaznaczonym błędem):
