Yasmin1304 (Talk | contribs) |
Yasmin1304 (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | + | <!DOCTYPE html> | |
<html> | <html> | ||
<head> | <head> | ||
− | + | <style> | |
− | + | body, html { | |
− | + | height: 100%; | |
− | + | } | |
− | + | .parallax { | |
− | + | /* The image used */ | |
− | + | background-image: url('https://static.igem.org/mediawiki/2017/a/ac/MG_8285-XL.jpg'); | |
− | + | ||
− | + | /* Full height */ | |
− | + | height: 100%; | |
− | + | ||
− | + | /* Create the parallax scrolling effect */ | |
− | + | background-attachment: fixed; | |
− | + | background-position: center; | |
− | background-size: | + | background-repeat: no-repeat; |
+ | background-size: cover; | ||
} | } | ||
− | + | </style> | |
</head> | </head> | ||
<body> | <body> | ||
− | <div class=" | + | <div class="parallax"> |
<p> | <p> | ||
− | + | fklkjrflkj;rfjrf | |
+ | 4fr4rf;lj;lf | ||
+ | 4rlfknl3k4j | ||
+ | |||
</p> | </p> | ||
</div> | </div> |
Revision as of 18:26, 13 October 2017
<!DOCTYPE html>
fklkjrflkj;rfjrf 4fr4rf;lj;lf 4rlfknl3k4j
Scroll Up and Down this page to see the parallax scrolling effect.
This div is just here to enable scrolling.
Tip: Try to remove the background-attachment property to remove the scrolling effect.