gpt4 book ai didi

jquery - turnjs插件翻书中间需要渐变

转载 作者:行者123 更新时间:2023-11-28 12:59:45 34 4
gpt4 key购买 nike

在 turnjs 插件中,渐变始终默认设置为 true。

$('#magazine').turn({gradients: true, acceleration: true});

但渐变没有出现在活页簿中。书的中间应该有一个渐变。此外,还有一些来自页面 div(翻页书的页面)的类也丢失了。页面左侧和右侧的奇数和偶数类也分别丢失。但这些类对于样式设计非常重要。以及任何使 turnjs 翻页书响应的提示..

实际上我在 turn.js 插件代码表中看到了一些正在制作的渐变类。如您所见,在选项中正在初始化插件中的 gradeint,但它不起作用..

note: using third release of turnjs

最佳答案

确实一般情况下缺少 Div(网络上的示例),但是,为了在页面的 div 中添加带有名为该类的类的渐变,我将介绍我正在使用的整个结构工作完美:

<div class="zoom-viewport">
<div class="container">
<div id="flipbook">
<div class="hard"><div class="gradient"></div></div>
<div class="normalPage"><div class="gradient"></div><img src="pages/00.jpg" /></div>
</div>
</div>
</div>

渐变的 css 将是:

#flipbook .even .gradient {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: -webkit-gradient(linear, left top, right top, color-stop(0.95, rgba(0,0,0,0)), color-stop(1, rgba(0,0,0,0.2)));
background-image: -webkit-linear-gradient(left, rgba(0,0,0,0) 90%, rgba(0,0,0,0.3) 100%);
background-image: -moz-linear-gradient(left, rgba(0,0,0,0) 90%, rgba(0,0,0,0.3) 100%);
background-image: -ms-linear-gradient(left, rgba(0,0,0,0) 90%, rgba(0,0,0,0.3) 100%);
background-image: -o-linear-gradient(left, rgba(0,0,0,0) 90%, rgba(0,0,0,0.3) 100%);
background-image: linear-gradient(left, rgba(0,0,0,0) 90%, rgba(0,0,0,0.3) 100%);
}

#flipbook .odd .gradient {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: -webkit-gradient(linear, right top, left top, color-stop(0.95, rgba(0,0,0,0)), color-stop(1, rgba(0,0,0,0.15)));
background-image: -webkit-linear-gradient(right, rgba(0,0,0,0) 90%, rgba(0,0,0,0.3) 100%);
background-image: -moz-linear-gradient(right, rgba(0,0,0,0) 90%, rgba(0,0,0,0.3) 100%);
background-image: -ms-linear-gradient(right, rgba(0,0,0,0) 90%, rgba(0,0,0,0.3) 100%);
background-image: -o-linear-gradient(right, rgba(0,0,0,0) 90%, rgba(0,0,0,0.3) 100%);
background-image: linear-gradient(right, rgba(0,0,0,0) 90%, rgba(0,0,0,0.3) 100%);
}

关于jquery - turnjs插件翻书中间需要渐变,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21585879/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com