Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="ru">
- <head>
- <meta charset="utf-8">
- <style>
- html, body, div {
- padding: 0;
- margin: 0;
- width: 100%;
- height: 100%;
- }
- #bg {
- position: fixed;
- top: 0;
- left: 0;
- background: url('http://www.htmlcodetutorial.com/tables/deepsea.gif');
- opacity: 1;
- }
- #field {
- position: fixed;
- top: 0;
- left: 0;
- }
- #test {
- margin: 10px;
- font-size: 3em;
- color: #FFF;
- }
- </style>
- <script>
- function setOpacity() { bg.style.opacity = 0.5; }
- window.onload = function() { test.onclick = setOpacity; }
- </script>
- </head>
- <body>
- <div id="bg"></div>
- <div id="field">
- <a id="test" href="#">тест</a>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement