Skip to content

Instantly share code, notes, and snippets.

@dokenzy
Created March 11, 2014 12:36
Show Gist options
  • Save dokenzy/9484763 to your computer and use it in GitHub Desktop.
Save dokenzy/9484763 to your computer and use it in GitHub Desktop.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<style>
.TabWrap a {
display: inline-block;
border: 1px solid #CCCCCC;
float: left;
text-align: center;
text-decoration: none;
position: relative;
padding: 10px 30px 8px;
}
.TabWrap a:hover {
background: #ffa500;
color: #fff;
}
.TabWrap a.active:after {
content: "";
position: absolute;
top: 100%;
left: 50%;
z-index: 1000;
border-top: 8px solid #ffa500;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
margin-left: -8px;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>
<div class="TabWrap">
<a href="#">가나다라</a>
<a href="#">가나다라마바사아자차</a>
</div>
<script type="text/javascript">
$('a').mouseover(function(e){
$(this).addClass('active');
}).mouseout(function(e){
$(this).removeClass('active');
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment