Skip to content

Instantly share code, notes, and snippets.

@potato4d
Last active August 29, 2015 14:25
Show Gist options
  • Save potato4d/16dc80dee2ef7996a901 to your computer and use it in GitHub Desktop.
Save potato4d/16dc80dee2ef7996a901 to your computer and use it in GitHub Desktop.
topic152717 answer
<!DOCTYPE html>
<html>
<head>
<title>topic 152717 answer</title>
<style>
ul{
list-style: none;
}
ul li a{
position: relative;
display: block;
width: 200px;
height: 200px;
}
ul li a img{
width: 200px;
height: 200px;
}
ul li a span{
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
width: 100px;
height: 20px;
text-align: center;
vertical-align: middle;
}
</style>
</head>
<body>
<ul>
<li>
<a href="test"a>
<span>テキスト</span>
<img src="http://placehold.jp/200x200.png">
</a>
</li>
</ul>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment