欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 前端技术 > CSS >内容正文

CSS

html 书架样式css,CSS3 响应式书架布局

发布时间:2025/4/5 CSS 44 豆豆
生活随笔 收集整理的这篇文章主要介绍了 html 书架样式css,CSS3 响应式书架布局 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

CSS

语言:

CSSSCSS

确定

.book,

.book img,

.book::after,

.book::before {

border-top-right-radius: 5px;

border-bottom-right-radius: 5px;

}

body,

html {

width: 100%;

height: 100%;

display: table;

text-align: center;

}

body {

background: #fde3a7;

}

ul {

display: table-cell;

vertical-align: middle;

}

.list-inline {

padding-left: 0;

list-style: none;

}

.list-inline > li {

display: inline-block;

margin-left: 2em;

}

.list-inline > li:first-child {

margin-left: 0;

}

.book {

cursor: pointer;

display: block;

width: 150px;

height: 220px;

position: relative;

background: white;

z-index: 1;

box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1), 0 9px 20px 0 rgba(0, 0, 0, 0.25);

overflow: hidden;

-webkit-transition: box-shadow 0.3s linear;

transition: box-shadow 0.3s linear;

}

.book img {

width: inherit;

height: inherit;

-webkit-transform-origin: 0 50%;

-ms-transform-origin: 0 50%;

transform-origin: 0 50%;

-webkit-transform: rotateY(0);

transform: rotateY(0);

-webkit-transition: all 0.45s ease;

transition: all 0.45s ease;

}

.book:hover {

box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.25), 0 9px 20px 0 rgba(0, 0, 0, 0.45);

}

.book:hover img {

-webkit-transform: rotateY(-25deg);

transform: rotateY(-25deg);

box-shadow: 1px 1px 5px 5px rgba(0, 0, 0, 0.2);

}

.book::after,

.book::before {

content: '';

display: block;

width: inherit;

height: inherit;

position: absolute;

z-index: -1;

top: 0;

background: white;

border: 1px solid #d9d9d9;

}

.book::before {

left: -3px;

}

.book::after {

left: -6px;

}

总结

以上是生活随笔为你收集整理的html 书架样式css,CSS3 响应式书架布局的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。