Created
March 24, 2011 06:51
-
-
Save marsz/884674 to your computer and use it in GitHub Desktop.
clip + css spreties
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
<html> | |
<head> | |
<style type="text/css"> | |
div { | |
position:relative; | |
top:-100px; | |
} | |
img { | |
position: absolute; | |
clip:rect(100px 100px 200px 0px); | |
} | |
</style> | |
</head> | |
<body> | |
<p>clip 属性剪切了一幅图像:</p> | |
<div> | |
<a href="#"><img border="0" src="http://www.google.com.tw/logos/2011/houdini11-hp.jpg" width="120" height="151"></a> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment