Skip to content

Instantly share code, notes, and snippets.

@samarkandiy
Created October 4, 2012 07:08
Show Gist options
  • Save samarkandiy/3831937 to your computer and use it in GitHub Desktop.
Save samarkandiy/3831937 to your computer and use it in GitHub Desktop.
created by Azik Samarkandiy
.slider
%input.slide1{:checked => "", :name => "thumbnail", :type => "radio"}/
%input.slide2{:name => "thumbnail", :type => "radio"}/
%input.slide3{:name => "thumbnail", :type => "radio"}/
%input.slide4{:name => "thumbnail", :type => "radio"}/
.images
/*
Created by Azik Samarkandiy
[email protected]
Follow me on twitter @samarkandiy
Look dude no JS :)
*/
body {
background: #ccc;
width: 950px;
margin: 0 auto;
padding: 10px;
}
.slider {
background: #111;
width: 950px;
height: 350px;
padding: 10px;
position: relative;
top: 10px;
box-shadow: 0 30px 50px -20px black;
overflow: hidden;
}
.images {
background: #ccc;
width: 100%;
height: 74%;
transition: background .5s linear;
}
input[type='radio'] {
-webkit-appearance: none;
appearance: none;
background-color: #444;
background-size: 225px 70px;
width: 225px;
height: 70px;
margin: 5px;
cursor: pointer;
position: relative;
float: left;
top: 270px;
-webkit-filter: sepia();
}
input[type='radio']:checked {
content: '';
border: solid 5px #fff;
box-shadow: none;
-webkit-filter: none;
}
.slide1 {
background: url(http://iweb.uz/azik/wp-content/uploads/2012/10/samarkand1.jpg);
}
.slide2 {
background: url(http://iweb.uz/azik/wp-content/uploads/2012/10/samarkand2.jpg);
}
.slide3 {
background: url(http://iweb.uz/azik/wp-content/uploads/2012/10/samarkand3.jpg);
}
.slide4 {
background: url(http://iweb.uz/azik/wp-content/uploads/2012/10/samarkand4.jpg);
}
.slide1:checked ~ .images {
background: url(http://iweb.uz/azik/wp-content/uploads/2012/10/samarkand1.jpg);
}
.slide2:checked ~ .images {
background: url(http://iweb.uz/azik/wp-content/uploads/2012/10/samarkand2.jpg);
}
.slide3:checked ~ .images {
background: url(http://iweb.uz/azik/wp-content/uploads/2012/10/samarkand3.jpg);
}
.slide4:checked ~ .images {
background: url(http://iweb.uz/azik/wp-content/uploads/2012/10/samarkand4.jpg);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment