请问使用纯Css 如何实现这一效果呢(如上图中图片的左上角)?
注: 图片的border-radius:5px;
非常感谢!
请问使用纯Css 如何实现这一效果呢(如上图中图片的左上角)?
注: 图片的border-radius:5px;
非常感谢!
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<style type="text/css">
.main_img{ display: block;
width: 90%;
height: 4.954em;
position: relative;
overflow: hidden;
margin-left: 0.742em;
margin-top: 0.8em;
}
.main_img .new{
width: 3.25em;
height: 3.25em;
position: absolute;
top: 0;
left: 0;
background-size: 3.25em 3.25em;
background: url(http://m.lobo666.com/Public/image/main/new.png) no-repeat center;
}
</style>
<div class="main_img">
<!-- <a href="/index.php/Home/Detail/index/id/364.html"> -->
<a href="/index.php/Home/Detail/index/id/364/aid/100004.html">
<img src="http://lobo.lobo666.com/Uploads/Building/61772d6d46.jpg">
</a>
<!-- <div></div> -->
<div class="new"></div>
</div>
</body>
</html>
3 回答5.2k 阅读✓ 已解决
5 回答2k 阅读
3 回答1.5k 阅读✓ 已解决
2 回答2.6k 阅读✓ 已解决
2 回答1.9k 阅读✓ 已解决
3 回答1.1k 阅读✓ 已解决
1 回答3k 阅读✓ 已解决
一般使用绝对定位来解决