html翻页效果代码_html+css技能,制作书本翻页效果

本文介绍了如何使用HTML和CSS创建书本翻页效果,详细讲解了实现过程,包括定义标签和样式,以及过渡效果的设置。在鼠标悬停时,书本会发生旋转效果。同时,文章提供了完整的代码示例,并推荐了2021年的Java学习路线。
摘要由CSDN通过智能技术生成

30405e79b09ef2a25ad71552f815eb14.png

效果:

f271f78c1ea75b49fe057cb96f63af0d.png


有些细节没处理好 (“▔□▔)

实现:

  1. 定义标签,shu是书本,feng是封面,wen是文字内容。
<div class="shu">
       <div class="feng"></div>     
       <div class="wen">
           <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>
  1. 定义书本的基本属性,宽高,阴影等,伪类是下面和右面那两条阴影。
.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-g
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值