cranknet
Members
-
Joined
-
Last visited
Reputation Activity
-
cranknet reacted to Chris Day in Cool Header Effectyou can use this code
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Untitled Document</title> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <style> html, body{ height:200%; } #nav { background:none; height:70px; position:fixed; top:0; left:0; right:0; transition: background 0.5s; -webkit-transition: background 0.5s; } .hover { background:rgba(0, 0, 0, 0.5) !important; } .navLink{ height:70px; width:100px; text-align:center; float:left; line-height:70px; } </style> <script> $(function () { $(window).scroll(function () { if ($(window).scrollTop()>0) { $('#nav').addClass('hover'); } else { $('#nav').removeClass('hover'); } }); }); </script> </head> <body> <div id="nav"> <div class="navLink">link</div> <div class="navLink">link</div> <div class="navLink">link</div> <div class="navLink">link</div> </div> </body> </html> -
cranknet reacted to Jo 90 in Introduction RulesWelcome to the forum, this section is a place for you to introduce yourself to the rest of the community. If you have a question, you may be better suited asking it within the relevant topic.
If the administrator or moderators feel you have posted in the wrong section they will move the post to the correct place on the forum.
Should they feel you are abusing the forum by spam advertising they will remove your post. If you feel your post was moved or removed by mistake please contact the administrator or one of the moderators.
-
cranknet reacted to Chris Day in Help with styleIf you are using a serverside language like PHP the user cant see that code (only the html it outputs) but will have to secure it against attacks like SQL injection