Created
February 12, 2013 14:54
-
-
Save tutweb/4770386 to your computer and use it in GitHub Desktop.
Disable link using css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Disabled Link With CSS</title> | |
<style> | |
* { | |
margin: 0; | |
padding: 0; | |
} | |
body { | |
padding: 3em 2em; | |
font-size: 1em; | |
line-height: 1; | |
} | |
a { | |
text-decoration: none; | |
} | |
body { | |
text-align: center; | |
} | |
h1, p { | |
margin:20px 0; | |
} | |
.tombol { | |
display: inline-block; | |
padding: 10px 12px; | |
color: #fff; | |
text-decoration: none; | |
background: #3B5998; | |
border-radius: 3px; | |
} | |
.tombol:hover { | |
background:orange; | |
} | |
.disabled { | |
pointer-events: none; | |
opacity:0.5; | |
} | |
</style> | |
</head> | |
<body> | |
<h1><a href="http://www.tutorial-webdesign.com">Tutorial Web Design Indonesia</a></h1> | |
<p> | |
<a href="">Back to tutorial <small>http://www.tutorial-webdesign.com</small></a> | |
</p> | |
<div class="box"> | |
<a class="tombol" href="http://www.twitter.com/tut_web" target="_blank" title="Twitter @tut_web">Twitter</a> | |
<a class="tombol disabled" href="http://www.flickr.com" target="_blank" title="Flickr">flickr</a> | |
<a class="tombol" href="http://www.facebook.com/tutwebdesign" target="_blank" title="Facebook Fan Page">Facebook</a> | |
<a class="tombol" href="http://www.tutorial-webdesign.com" target="_blank" title="Official website">Website</a> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment