无码av一区二区三区无码,在线观看老湿视频福利,日韩经典三级片,成 人色 网 站 欧美大片在线观看

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

html + css 實(shí)現(xiàn)書本翻頁效果

2020-12-24 14:49 作者:編程大戰(zhàn)  | 我要投稿

效果:

實(shí)現(xiàn):

1、定義標(biāo)簽,shu是書本,feng是封面,wen是文字內(nèi)容。

2、定義書本的基本屬性,寬高,陰影等,偽類是下面和右面那兩條陰影。

transition: 1s cubic-bezier(.79,.34,.47,.92); 變化時間為1s,運(yùn)動曲線為 cubic-

3、鼠標(biāo)經(jīng)過,陰影變化,然后書本向左旋轉(zhuǎn):

transform: rotate(-5deg);旋轉(zhuǎn);

4、封面的基本樣式:

transform-origin: left; 封面旋轉(zhuǎn)的位置,旋轉(zhuǎn)點(diǎn)

5、封面旋轉(zhuǎn):

6、文本的基本屬性:

完整代碼:

<!DOCTYPE html>

<html>

<head>

? ? <meta charset="UTF-8">

? ? <meta name="viewport" content="width=device-width, initial-scale=1.0">

? ? <title>Document</title>

? ? <style>

? ? ? ? *{

? ? ? ? ? ? margin: 0;

? ? ? ? ? ? padding: 0;

? ? ? ? ? ? box-sizing: border-box;

? ? ? ? }

? ? ? ? body{

? ? ? ? ? ? height: 100vh;

? ? ? ? ? ? background-image: radial-gradient(white,black);

? ? ? ? ? ?

? ? ? ? ? ? display: flex;

? ? ? ? ? ? justify-content: center;

? ? ? ? ? ? align-items: center;

? ? ? ? }

? ? ? ? .shu{

? ? ? ? ? ? position: relative;

? ? ? ? ? ? width: 300px;

? ? ? ? ? ? height: 400px;

? ? ? ? ? ? background-color: rgba(255, 255, 255, 0.774);

? ? ? ? ? ? transform-style:? preserve-3d;

? ? ? ? ? ? box-shadow:? ?300px 0px 30px? rgb(0, 0, 0,.6) inset;

? ? ? ? ? ? transition: 1s cubic-bezier(.79,.34,.47,.92);

? ? ? ? }

? ? ? ? .shu::after{

? ? ? ? ? ? content: '';

? ? ? ? ? ? position: absolute;

? ? ? ? ? ? height: 3px;

? ? ? ? ? ? width: 303px;

? ? ? ? ? ? left: 0px;

? ? ? ? ? ? bottom: -3px;

? ? ? ? ? ?/*? background-color: rgb(100, 96, 96); */

? ? ? ? ? ?background-image: linear-gradient(to right,rgb(71, 68, 68),rgba(124, 120, 120, 0.3) );

? ? ? ? ? ? border-bottom-left-radius: 5px;

? ? ? ? }

? ? ? ? .shu::before{

? ? ? ? ? ? content: '';

? ? ? ? ? ? position: absolute;

? ? ? ? ? ? width: 3px;

? ? ? ? ? ? height: 100%;

? ? ? ? ? ? right: -3px;

? ? ? ? ? ? top: 0px;

? ? ? ? ? ? background-color: rgb(112, 108, 108);

? ? ? ? ? ?background-image: linear-gradient(to top,rgb(114, 111, 111),rgba(90, 87, 87, 0.5) );;

? ? ? ? ? ? border-top-right-radius: 3px;

? ? ? ? }

? ? ? ? .shu:hover{

? ? ? ? ? ? box-shadow:? ?30px 0px 30px? rgb(0, 0, 0,.6) inset;

? ? ? ? ? ? transform: rotate(-5deg);

? ? ? ? }

? ? ? ? .feng{

? ? ? ? ? ? position: absolute;

? ? ? ? ? ? width: 100%;

? ? ? ? ? ? height: 100%;

? ? ? ? ? ? z-index: 2;

? ? ? ? ? ? background-image: url(4.jpg);

? ? ? ? ? ? background-size: 100% ;

? ? ? ? ? ? transform-origin: left;

? ? ? ? ? ? transition: 1s cubic-bezier(.79,.34,.47,.92);

? ? ? ? ? ? border-top-left-radius: 2px;

? ? ? ? ? ? border-bottom-left-radius: 2px;

? ? ? ? }

? ? ? ? .shu:hover .feng{

? ? ? ? ? ? transform: rotateY(-140deg);

? ? ? ? }

? ? ? ? .wen{

? ? ? ? ? ? position: absolute;

? ? ? ? ? ? top: 0;

? ? ? ? ? ? left: 0;

? ? ? ? ? ? width: 100%;

? ? ? ? ? ? height: 100%;

? ? ? ? ? ? font-family: 'fangsong';

? ? ? ? ? ? text-align: left;

? ? ? ? }

? ? </style>

</head>

<body>

? ?<div>

? ? ? ?<div></div>? ? ?

? ? ? ?<div>

? ? ? ? ? ?<h3 style="padding-top: 50px;padding-left: 40px;">Life of Pi</h3>

? ? ? ? ? ?<p style=" padding-top: 20px; padding-left: 40px;padding-right: 15px;">

? ? ? ? ? ? He lives in Scarborough. He's a small, slim man – nomore than five foot five. Dark hair, dark eyes. Hair greyingat the temples. Can't be older than forty.? ? ? ? ? ? leasingcoffee-coloured complexion1. Mild fall weather, yet puts on abig winter parka with fur-lined hood2 for the walk to thediner.?

? ? ? ? ? ?</p>

? ? ? ?</div>

? ?</div>

</body>

</html>




html + css 實(shí)現(xiàn)書本翻頁效果的評論 (共 條)

分享到微博請遵守國家法律
河北区| 旬邑县| 海丰县| 宕昌县| 淳安县| 犍为县| 镇坪县| 崇礼县| 望奎县| 汾阳市| 桦川县| 萍乡市| 信丰县| 姚安县| 千阳县| 化州市| 十堰市| 望都县| 北安市| 腾冲县| 甘泉县| 天全县| 龙海市| 凌海市| 彭水| 剑川县| 新沂市| 偏关县| 奉化市| 陇西县| 宁城县| 衢州市| 西青区| 壶关县| 溧阳市| 唐海县| 扶余县| 临海市| 建德市| 沿河| 九寨沟县|