<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
.box{
background: url("../Chapter 10素材/akn.png") no-repeat;
width: 600px;
height: 600px;
}
body{
padding: 0;
margin: 0;
}
.box img{
width: 200px;
height: 200px;
border-radius: 50% ;
position: absolute;
left: 155px;
top: 160px;
}
.guner{
width: 200px;
height: 5px;
background-color: white;
position: absolute;
left: 150px;
border-radius: 2px 0 0 2px ;
}
.box img{
animation: zhuan 10s linear infinite;
}
@keyframes zhuan {
0%{transform: rotate(0deg)}
100%{transform: rotate(360deg)}
}
label{
color: white;
width: 60px;
height: 30px;
border: 1px solid red;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
display: block;
text-align: center;
line-height: 30px;
background-color: #ff8d8d;
float:left ;
}
[name="btn"]{
display: none;
}
.box img{
animation: zhuan 10s linear infinite;
animation-play-state: paused;
}
.guner{
background-color: black;
}
.guner{
transform-origin: left;
transition: all 300ms linear;
}
#ok:checked~.guner{
transform: rotate(45deg);
}
#ok:checked~img{
animation-play-state:running ;
}
</style>
</head>
<body>
<div class="box">
<!--播放,暂停-->
<label for="ok" id="paly">播放</label>
<input type="radio" id="ok" name="btn">
<label for="no" id="pause">暂停</label>
<input type="radio" id="no" name="btn">
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
.box{
background: url("../Chapter 10素材/akn.png") no-repeat;
width: 600px;
height: 600px;
}
body{
padding: 0;
margin: 0;
}
.box img{
width: 200px;
height: 200px;
border-radius: 50% ;
position: absolute;
left: 155px;
top: 160px;
}
.guner{
width: 200px;
height: 5px;
background-color: white;
position: absolute;
left: 150px;
border-radius: 2px 0 0 2px ;
}
.box img{
animation: zhuan 10s linear infinite;
}
@keyframes zhuan {
0%{transform: rotate(0deg)}
100%{transform: rotate(360deg)}
}
label{
color: white;
width: 60px;
height: 30px;
border: 1px solid red;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
display: block;
text-align: center;
line-height: 30px;
background-color: #ff8d8d;
float:left ;
}
[name="btn"]{
display: none;
}
.box img{
animation: zhuan 10s linear infinite;
animation-play-state: paused;
}
.guner{
background-color: black;
}
.guner{
transform-origin: left;
transition: all 300ms linear;
}
#ok:checked~.guner{
transform: rotate(45deg);
}
#ok:checked~img{
animation-play-state:running ;
}
</style>
</head>
<body>
<div class="box">
<!--播放,暂停-->
<label for="ok" id="paly">播放</label>
<input type="radio" id="ok" name="btn">
<label for="no" id="pause">暂停</label>
<input type="radio" id="no" name="btn">
<img src="../../Chapter09/images/delicious.png" />
<div class="guner">
</div>
<div class="btn-box">
</div>
</div>
</body>
</html>