div+css里面左浮动 右浮动 到底是什么意思??

html-css023

div+css里面左浮动 右浮动 到底是什么意思??,第1张

左浮动即float:left,使布局元素靠左浮动。右浮动即float:right,使布局元素靠右浮动。在网页布局中结合这两种布局方式可以设计出千变万化的布局形式!只要发散你的思维,开拓你的想象相信定能设计出好的作品!祝你成功!

<!DOCTYPE html>

<html>

<head> 

<meta charset="utf-8"> 

<title></title> 

<style>

*{ padding:0margin:0font-size:14px }

body{

background: grey

}

.d{

position:fixedmargin:autoleft:0right:0bottom:24pxwidth: 160pxheight:120px

animation: d1 3s linear animation-fill-mode: both

}

@keyframes d1{

from{

bottom: 24px

}

to{

bottom: 360px

}

}

.d img{

height:120pxposition: absolutemargin:autoleft:0top:0animation: d2 2s 3s linear infinite animation-fill-mode: both

}

@keyframes d2{

0%,100%{

transform:rotate(0deg)

}

50%{  

left: 40px

transform:rotate(90deg)

}

}

</style>

</head>

<body>

<div class="d">

<img src="http://aimusic.image.alimmdn.com/Image/6d235b11f15838d6711ec6b0ca5e1a32.png"/>

</div>

</body>

</html>