我有一个div(具有固定宽度)有2个图像元素作为孩子.
每个图像的宽度与div相同,因此图像不在同一行上(参见屏幕截图).
这很棒,但我希望图像以相同的方式显示(一个在另一个上面),但在div的底部.
我能够在某些浏览器中使用以下方法实现此类行为:
-webkit-transform: rotate(180deg); -moz-transform: rotate(180deg);
Run Code Online (Sandbox Code Playgroud)
在div css上.
有没有更好的方法来实现这一目标?
这是我用于示例的代码:
<html>
<head>
<style type="text/css">
.container {background:url(http://img01.imagefra.me/img/img01/1/11/10/f_dwr8biwm_3ed594d.png) no-repeat;height:116px;
width:33px}
</style>
</head>
<body>
<div class="container">
<img src="http://img01.imagefra.me/img/img01/1/11/10/f_ei8p1qf6om_0e5c35c.png" width="33px">
<img src="http://img01.imagefra.me/img/img01/1/11/10/f_ei8p1qf6om_0e5c35c.png" width="33px">
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)