我想实现以下目标:
-
-请看我想要达到的附加图像
-
从Y轴的角度来看,cloud1位于欢迎区的中心。
<div class="welcome-section">
<div id="cloud1"></div>
<div fxLayout="column" fxLayoutAlign="center center">
<h1 style="text-align: center;">THE BEST IS YET TO COME</h1>
<h2 style="text-align: center;" fxFlexOffset="50px">USE IT TO DO ANYTHING</h2>
<button mat-raised-button fxFlexOffset="25px">TRY IT FOR FREE</button>
<img class="recycle-image" src="https://cdn2.iconfinder.com/data/icons/flat-jewels-icon-set/512/0000_Refresh.png" alt="Computer Hope" fxFlexOffset="25px">
</div>
</div>
CSS格式:
#cloud1{
width:300px;
height:100px;
background:#cb239e;
margin:140px 0 0 0;
border-radius:50px;
-webkit-transform:translateX(-400px);
transform:translateX(-400px);
-webkit-animation: move 7s linear infinite;
animation: move 7s linear infinite ;
display:block-inline;
position: relative;
}
#cloud1:before{
content:"";
position: relative;
width:180px;
height:180px;
background:#cb239e;
border-radius:50%;
margin:-100px 0 0 20px;
}
#cloud1:after{
content:"";
position: absolute;
width:120px;
height:120px;
background:#cb239e;
border-radius:50%;
margin:-60px 0 0 165px;
}
我还做了一个
demo
.
任何帮助都将不胜感激。