como fazer elementos que scroll diferente
$(window).scroll(function(e){
parallax();
});
function parallax(){
var scrolled = $(window).scrollTop();
$('.bg').css('top',-(scrolled*0.2)+'px');
}.bg {
background: url('http://i.imgur.com/USFbNpC.jpg') repeat;
position: fixed;
width: 100%;
height: 300%;
top:0;
left:0;
z-index: -1;
}
section {
color: #fff;
font-family: arial;
width: 500px;
margin: auto;
line-height: 20px;
font-size: 16px;
}
Also in CSS:
- css selectors cheat sheet
- jquery element css
- css align text
- blur effect css
- como fazer uma linha vertical no html
- css border
- transparent button css
- css span to right of div
- css disable mouse events
- select first div css
- github-pages main.css cancel
- code changes to Hostgator not being reflected
- acf true false field default value
- sass mixin breakpoint
- css :focus
- media query for mobile view css
- javascript remove css class
- hover on father elemet activates a child element css
- css form textarea resize
- sidebar hide in css
- row class in bootstrap
- css flex
- font condensed
- css in js