0
如何制作一个元素,使其宽度和高度不会影响其周围元素?保持元素不变,在变换元素旁边
p {
position: relative;
}
.p1 {
width:200px;
height:200px;
border:1px solid blue;
outline: 1px solid green;
display:inline;
text-align:center;
background-color: red;
color: #FFF;
position:relative;
display:inline-block;
float:left;
-webkit-transition: width 2s, height 2s, background-color 2s, -webkit-transform 2s, color 2s;
}
.p1:hover {
width:500px;
height: 500px;
-webkit-transform: rotate(180deg);
color:black;
}
<p class="p1">hello1</p>
<p style="" class="p1">hello2</p>
<p style="" class="p1">hello3</p>
演示在http://jsfiddle.net/toadalskii/mLx0x56n/
+1发布您的解决方案在我之前几秒钟:p – 2014-10-20 16:32:50
感谢它的工作 – 2014-10-21 16:41:54