CSS3 照片墙_html/css_WEB-ITnose

WBOY
풀어 주다: 2016-06-24 11:52:28
원래의
1185명이 탐색했습니다.

HTML

 1 <body> 2     <h2>照片墙制作</h2> 3     <div class="container"> 4         <img class="img1" src="img/img (1).jpg"    style="max-width:90%"  style="max-width:90%" alt=""> 5         <img class="img2" src="img/img (2).jpg"    style="max-width:90%"  style="max-width:90%" alt=""> 6         <img class="img3" src="img/img (3).jpg"    style="max-width:90%"  style="max-width:90%" alt=""> 7         <img class="img4" src="img/img (4).jpg"    style="max-width:90%"  style="max-width:90%" alt=""> 8         <img class="img5" src="img/img (5).jpg"    style="max-width:90%"  style="max-width:90%" alt=""> 9     </div>10 </body>
로그인 후 복사

CSS(此处省略了浏览器私有属性前缀!)

 1 <style> 2         * {margin:0; padding:0;} 3         body { background-color: #eee; padding-top: 50px;} 4         h2 { text-align: center;} 5         .container { position: relative; width:1000px; height:700px; margin:0px auto; } 6         img { position: absolute; top:50px; left:100px; cursor: pointer; 7             padding:10px 10px 25px; background-color: #fff; border:1px solid #ddd; 8             transition:0.5s; box-shadow: 3px 3px 3px #ccc; 9         }10         .img1 {    left:40px;    top:20px;    transform:rotate(30deg);    z-index: 1;}11         .img2 {    left:156px;    top:156px;    transform:rotate(-30deg);    z-index: 1;}12         .img3 {    left:381px;    top:60px;    transform:rotate(30deg);    z-index: 1;}13         .img4 {    left:458px;    top:256px;    transform:rotate(30deg);    z-index: 1;}14         .img5 {    left:684px;    top:110px;    transform:rotate(-40deg);    z-index: 1;}15         img:hover {    transform:rotate(0deg);    transform:scale(1.5);    box-shadow: 6px 6px 6px #656565; z-index: 2;}16</style>
로그인 후 복사

SHOW

관련 라벨:
원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
최신 이슈
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!