Pirate captain Millet home boat swing back and forth CSS3.0 effect, occasionally seen between, wrote a.
1 <!DOCTYPE HTML>2 <HTMLLang= "en">3 <Head>4 <MetaCharSet= "UTF-8">5 <title>Javascript</title>6 <styletype= "Text/css">7 *{margin:0px;padding:0px;}8 . BG{Height:795px;width:622px;background:URL (images/bg.jpg) 0px 0px no-repeat;position:relative;}9 . Xiaoshan{Height:795px;width:622px;background:URL (images/xiaoshan.png) 0px 0px no-repeat;position:Absolute;Z-index:3;}Ten . BG. Xiaochuan{ One width:449px; A Height:323px; - background:URL (images/xiaochuan.png) 0px 0px no-repeat; - position:Absolute; the Top:373px; - Left:78px; - Z-index:2; - Animation:2.5s ship Infinite; + -webkit-animation:2.5s ship Infinite; - -webkit-transform-origin:254px 22px; + -ms-transform-origin:254px 22px; A Transform-origin:255px 22px;} at @keyframes Ship{ - 0% { - -webkit-transform:Rotate (0deg); - Transform:Rotate (0deg); - } - 50%{ in -webkit-transform:Rotate ( -60deg); - Transform:Rotate ( -60deg); to } + 100%{ - -webkit-transform:Rotate (0deg); the Transform:Rotate (0deg); * } $ }Panax Notoginseng @-webkit-keyframes Ship{ - 0% { the -webkit-transform:Rotate (0deg); + Transform:Rotate (0deg); A } the 50%{ + -webkit-transform:Rotate ( -60deg); - Transform:Rotate ( -60deg); $ } $ 100%{ - -webkit-transform:Rotate (0deg); - Transform:Rotate (0deg); the } - }Wuyi </style> the </Head> - <Body> Wu <Divclass= "BG"> - <Divclass= "Xiaoshan"></Div> About <Divclass= "Xiaochuan"></Div> $ </Div> - </Body> - </HTML> - <Scripttype= "Text/javascript"> A + the </Script>
Effect: It is actually the effect of the boat swinging back and forth.
Pirate captain Millet home boat swing back and forth CSS3.0 effect