Home > Web Front-end > HTML Tutorial > CSS3 realizes image floating animation_html/css_WEB-ITnose

CSS3 realizes image floating animation_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:45:43
Original
1343 people have browsed it


.gist {    width:220px;    height:130px;    background-image: url(2.jpg);    background-repeat:no-repeat;    border:5px solid green;    background-position:50% 50%;    transition:background-position 2s;    -moz-transition:background-position 2s; /* Firefox 4 */    -webkit-transition:background-position 2s; /* Safari and Chrome */    -o-transition:background-position 2s; /* Opera */}.gist:hover {  background-position: 50% -100px;}<div class="gist"></div>图片水平垂直居中:background-position:50% 50%;
Copy after login



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template