当前位置: 首页 > news >正文

.com网站备案2020年百度搜索排名

.com网站备案,2020年百度搜索排名,规划设计公司简介,深圳设计网站开发新增需求,客户需要类似PPT的剥离效果用于WEB页面翻页,查找资料后,参考下方的掘金博主的文章,并将HTML修改成vue的页面进行使用。其中宽度、高度改成了变量,样式style中的属性与宽高的关系整理成了公式进行动态计算。 …

新增需求,客户需要类似PPT的剥离效果用于WEB页面翻页,查找资料后,参考下方的掘金博主的文章,并将HTML修改成vue的页面进行使用。其中宽度、高度改成了变量,样式style中的属性与宽高的关系整理成了公式进行动态计算。

宽高比例建议不超过2倍,否则样式就会有问题。如果有极限值出现的情况,建议把rotateBox的border显示,进行调整时各个div之间的关系看得更清晰。

【完整代码】

<template><div class="container"><article><div class="book"><div class="rotateBox" :style="rotateBoxStyles"><div class="pageItem front" :style="[pageItemStyles,frontStyle]"><figure><img src="https://cdn.pixabay.com/photo/2023/11/22/18/13/beach-8406104_640.jpg" alt=""><figcaption>Page 1</figcaption></figure></div><div class="pageItem back" :style="[pageItemStyles, backStyle]"><figure><img src="https://cdn.pixabay.com/photo/2023/07/07/15/51/sea-8112910_640.jpg" alt=""><figcaption>Page 2</figcaption></figure></div></div><div class="pageItem" :style="pageItemStyles"><figure><img src="https://cdn.pixabay.com/photo/2021/11/26/17/26/dubai-desert-safari-6826298_640.jpg" alt=""><figcaption>Page 3</figcaption></figure></div></div></article></div>
</template><script>
export default {data() {return {pageWidth: 400,pageHeight: 200,}},computed: {pageItemStyles() {return {width: this.pageWidth + 'px',height: this.pageHeight + 'px',}},rotateBoxStyles() {return {width: this.pageWidth * 2 + this.pageHeight * 0.5 + 'px',height: this.pageWidth * 2 + this.pageHeight * 0.5 + 'px',bottom: -this.pageWidth * 2 + 'px',transformOrigin: '0 ' + (this.pageWidth * 2 + this.pageHeight * 0.5) + 'px',transform: 'rotate(-'+ Math.atan((2*this.pageWidth - this.pageHeight)/this.pageWidth)* (180 / Math.PI) +'deg)',}},frontStyle() {return {bottom: (2*this.pageWidth - this.pageHeight) + 'px',// bottom: 0.5*(this.pageWidth * 2 + this.pageHeight * 0.5) + 'px',// bottom: this.pageHeight * 0.5+ 'px',transformOrigin: '0 ' + (this.pageWidth * 2) + 'px',transform: 'rotate('+ Math.atan((2*this.pageWidth - this.pageHeight)/this.pageWidth)* (180 / Math.PI) +'deg)',}},backStyle() {return {bottom: (2*this.pageWidth - this.pageHeight) + 'px',// bottom: 0.5*(this.pageWidth * 2 + this.pageHeight * 0.5) + 'px',// bottom: this.pageHeight * 0.5+ 'px',left: - this.pageWidth + 'px',transformOrigin: this.pageWidth + 'px' +' ' + (this.pageWidth * 2) + 'px',transform: 'rotate('+ (180 - Math.atan((2*this.pageWidth - this.pageHeight)/this.pageWidth)* (180 / Math.PI)) +'deg)',}},},
}</script><style scoped lang="less">
.container {position: relative;margin-top: 100px;
}.book {background-color: cornflowerblue;position: relative;
}article {position: relative;width: 500px;height: 400px;// padding: 40px 80px 40px 380px;margin: auto;// box-shadow: 2px 3px 5px 6px #3f1300;// background-image: url(https://cdn.pixabay.com/photo/2016/12/18/09/05/trees-1915245_1280.jpg);
}.pageItem {position: absolute;overflow: hidden;// width: 500px;  // w// height: 400px; // hfont-size: 32px;text-align: center;box-shadow: 0 0 11px rgba(0, 0, 0, .5);
}.rotateBox {overflow: hidden;position: absolute;z-index: 10;// width: 1200px;  // 2w+0.5h// height: 1200px; // 2w+0.5h// bottom: -1000px; // -2w// transform-origin: 0px 1200px;  // 0 2w+0.5hborder: 1px dashed #b0b0b0;//transform: rotate(-50.19deg); // -arctan((2w-h)/w)transition: 1s;// background: pink;
}.front {// bottom: 600px; // 2w-h// transform-origin: 0 1000px; // 0 2w// transform: rotate(50.19deg); // arctan((2w-h)/w)transition: 1s;
}.back {// bottom: 600px; // 2w-h// left: -500px; // -w// transform-origin: 500px 1000px; // w 2w// transform: rotate(129.81deg); // 180 - arctan((2w-h)/w)transition: 1s;
}figure img {width: 100%;height: 100%;aspect-ratio: 3/4;object-fit: cover;
}figure figcaption {position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);text-wrap: nowrap;color: #fff;background-color: rgba(255, 255, 255, .5);padding: 1em;border: 4px double #fff;
}article:hover .rotateBox {transform: rotate(-90deg) !important;
}article:hover .front {transform: rotate(90deg) !important;
}article:hover .back {transform: rotate(90deg) !important;
}
</style>

【参考文章】

CSS实现翻页效果

http://www.hkea.cn/news/319407/

相关文章:

  • 0基础1小时网站建设教程如何给自己的公司建网站
  • 成都网站建设s1emens电商平台怎么加入
  • 六合哪家做网站建设域名注册查询软件
  • 网站建设的方案费用2023年新冠疫情最新消息
  • 九星市场做网站快速将网站seo
  • 长春做网站推广的公司提升神马关键词排名报价
  • 金融网站cms百度网盘客服电话人工服务
  • 美观网站建设物美价廉seo网站优化专员
  • 网站设计应该怎么做推广软文代写
  • 网站建设工作室发展百度收录教程
  • 没有网站 可以做百度口碑吗成都网站制作
  • 医院系统网站建设百度宁波营销中心
  • 网站劫持代码杭州互联网公司排名榜
  • 做网站找哪个部门吸引人的推广标题
  • 网站制作软件名字线做竞价推广代运营公司
  • avada如何做中英文网站沈阳百度推广排名优化
  • 做网站品长沙网络营销公司排名
  • b2b商贸网站环球网最新消息疫情
  • wordpress next主题什么是seo教程
  • 如何规划一个网站快手秒赞秒评网站推广
  • 中国网站开发网站seo需要用到哪些工具
  • 织梦做的网站首页出现空白网页平台做个业务推广
  • 备案做电影网站吗yandx引擎入口
  • 网站双倍浮动百度账号登陆入口
  • 聊城市网站建设网站推广排名
  • 帝国新闻网站模板百度seo推广怎么做
  • 预约做港澳证的网站网站排名在线优化工具
  • 罗湖实惠的网站建设费用成都官网seo厂家
  • 建设部官方网站有哪些优帮云排名优化
  • 天津做网站找谁新东方在线教育平台官网