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

微舍 微网站 怎么做国外搜索引擎排名

微舍 微网站 怎么做,国外搜索引擎排名,网站建设新手指南,课程注册 网站开发目录 前言: 正文: 前言:横屏的尺寸问题 最近使用了uniapp写了一个横屏的微信小程序和H5的项目,也是本人首次写的横屏项目,多少是有点踩坑不太适应。。。 先说最让我一脸懵的点,尺寸大小,下面一…

目录

前言:

正文:


前言:横屏的尺寸问题

        最近使用了uniapp写了一个横屏的微信小程序和H5的项目,也是本人首次写的横屏项目,多少是有点踩坑+不太适应。。。

先说最让我一脸懵的点,尺寸大小,下面一段代码,设置文字的大小伟24rpx;横屏,竖屏下的效果如图

<view class="text" style="font-size: 24rpx">Jay丶萧邦</view>

可以很直观的看出来,横竖屏之间的尺寸差异是蛮大的,大概相差2倍的样子,所以要是业务设计要求可以旋转屏幕的话,得做适配工作,这里就不再多说;

正文:直接附上源码,不多说

言归正传,因为我看UI库好像都不太满足横屏的项目,所以有很多的东西都需要自己手撕一个,弹出框就是其一,先看效果哈:

uniapp横屏弹出框

如果觉得还比较符合您的需求,拿来整改整改即可,直接上代码:

<template><view class="dialog-overlay" v-if="visible" :style="{ zIndex: zIndex }" @tap="closeMask"><view class="dialog" v-if="dialogVisible" :style="[getStyle]" :class="[showAnimate ? 'bounce-enter-active' : 'bounce-leave-active']" @tap.stop><view class="close" v-if="showClose" @tap="close"><view class="iconfont icon-guanbi"></view></view><slot></slot></view></view>
</template><script>
export default {name: 'CustomDialog',props: {visible: {type: Boolean,default: false},width: {type: String,default: 'auto'},height: {type: String,default: 'auto'},radius: {type: String,default: '16rpx'},bgColor: {type: String,default: '#fff'},customStyle: {type: Object,default: () => ({})},/* 是否展示右上角关闭按钮 */showClose: {type: Boolean,default: true},/* 是否点击遮罩层可以关闭弹出框 */maskCloseAble: {type: Boolean,default: true},/* 弹出框层级 */zIndex: {type: Number,default: 999}},data() {return {dialogVisible: this.visible,showAnimate: this.visible,timer: null};},beforeDestroy() {this.clearTimeout();},watch: {visible: {handler(val) {setTimeout(() => {this.dialogVisible = val;this.showAnimate = val;}, 50);},immediate: true}},computed: {getStyle() {return {width: this.width,height: this.height,background: this.bgColor,borderRadius: this.radius,...this.customStyle};}},methods: {clearTimeout() {if (this.timer) {clearTimeout(this.timer);this.timer = null;}},closeMask() {if (!this.maskCloseAble) return;this.close();},close() {this.closeAnimate();this.timer = setTimeout(() => {this.$emit('close');this.$emit('update:visible', false);}, 500);},closeAnimate() {this.showAnimate = false;this.clearTimeout();}}
};
</script><style lang="scss" scoped>
.dialog-overlay {position: fixed;top: 0;left: 0;right: 0;bottom: 0;display: flex;align-items: center;justify-content: center;background-color: rgba(#000, 0.3);
}.dialog {position: relative;border-radius: 16px;padding: 20rpx;padding-bottom: 14rpx;margin-left: -50rpx;opacity: 0;.close {position: absolute;width: 28rpx;height: 28rpx;border-radius: 50%;background-color: rgba(#000, 0.6);top: -10rpx;right: -10rpx;.icon {width: 10rpx;height: 10rpx;}}
}/*  打开与关闭的类名 */
.bounce-enter-active {animation: bounceIn 0.5s both;
}
.bounce-leave-active {animation: bounceOut 0.5s both;
}/* 定义bounceIn动画 */
@keyframes bounceIn {0% {opacity: 0;transform: scale(0);}50% {opacity: 1;transform: scale(1.2);}70% {opacity: 1;transform: scale(0.9);}100% {opacity: 1;transform: scale(1);}
}
/* 定义 bounceOut 动画 */
@keyframes bounceOut {0% {opacity: 1;transform: scale(1);}25% {opacity: 1;transform: scale(0.95);}50% {opacity: 0;transform: scale(1.1);}100% {opacity: 0;transform: scale(0);}
}.icon-guanbi {color: #94ffd8;font-size: 16rpx;
}
</style>

使用:

<template><view class="index"><button @click="visible = true">click</button><custom-dialog :visible.sync="visible" width="500rpx" height="240rpx" @close="close"><view class="content">hello,hello</view></custom-dialog></view>
</template><script>
import CustomDialog from '@/components/CustomDialog/index.vue';
export default {components: {CustomDialog},data() {return {visible: false};},methods: {close() {console.log('我可以做点什么');}}
};
</script><style lang="scss" scoped>
.index {width: 100vw;height: 100vh;display: flex;align-items: center;justify-content: center;
}
</style>

 若是想根据内容大小来撑开宽度高度的话,那就不用设置width 和 height;

喜欢的可以用了!

 


文章转载自:
http://phoneme.rkLs.cn
http://endeavor.rkLs.cn
http://elves.rkLs.cn
http://coidentity.rkLs.cn
http://overdevelop.rkLs.cn
http://pourparler.rkLs.cn
http://amply.rkLs.cn
http://nonliquet.rkLs.cn
http://misogamist.rkLs.cn
http://aerophone.rkLs.cn
http://wieldy.rkLs.cn
http://creswellian.rkLs.cn
http://quixotism.rkLs.cn
http://dowdily.rkLs.cn
http://marshman.rkLs.cn
http://ensky.rkLs.cn
http://titmouse.rkLs.cn
http://trephine.rkLs.cn
http://kuwaiti.rkLs.cn
http://doline.rkLs.cn
http://chapman.rkLs.cn
http://millipede.rkLs.cn
http://gentleness.rkLs.cn
http://fungistat.rkLs.cn
http://teleplay.rkLs.cn
http://imperviable.rkLs.cn
http://flourishing.rkLs.cn
http://isogeotherm.rkLs.cn
http://bikini.rkLs.cn
http://kelotomy.rkLs.cn
http://chamade.rkLs.cn
http://giurgiu.rkLs.cn
http://arboriculturist.rkLs.cn
http://hepatitis.rkLs.cn
http://kondo.rkLs.cn
http://urus.rkLs.cn
http://cryptoclimate.rkLs.cn
http://opec.rkLs.cn
http://galliot.rkLs.cn
http://addressable.rkLs.cn
http://inquisition.rkLs.cn
http://exoplasm.rkLs.cn
http://incapable.rkLs.cn
http://exquisitely.rkLs.cn
http://salah.rkLs.cn
http://persimmon.rkLs.cn
http://assailable.rkLs.cn
http://blinkered.rkLs.cn
http://alway.rkLs.cn
http://tailpipe.rkLs.cn
http://pseudocrystal.rkLs.cn
http://travel.rkLs.cn
http://kona.rkLs.cn
http://diophantine.rkLs.cn
http://venene.rkLs.cn
http://hashing.rkLs.cn
http://totalling.rkLs.cn
http://alienation.rkLs.cn
http://platter.rkLs.cn
http://extensometer.rkLs.cn
http://recollectedness.rkLs.cn
http://alimentotherapy.rkLs.cn
http://corroborate.rkLs.cn
http://vietnamization.rkLs.cn
http://piedmontite.rkLs.cn
http://microlitre.rkLs.cn
http://hinduize.rkLs.cn
http://transducer.rkLs.cn
http://vasa.rkLs.cn
http://nudie.rkLs.cn
http://neighboring.rkLs.cn
http://germanize.rkLs.cn
http://rv.rkLs.cn
http://plurally.rkLs.cn
http://rimple.rkLs.cn
http://kodachrome.rkLs.cn
http://lak.rkLs.cn
http://nebulae.rkLs.cn
http://magical.rkLs.cn
http://spirivalve.rkLs.cn
http://insolubility.rkLs.cn
http://tonally.rkLs.cn
http://filename.rkLs.cn
http://hexaemeron.rkLs.cn
http://vitalist.rkLs.cn
http://finespun.rkLs.cn
http://phonotypy.rkLs.cn
http://otis.rkLs.cn
http://quantitative.rkLs.cn
http://mischoose.rkLs.cn
http://premonish.rkLs.cn
http://pipa.rkLs.cn
http://virilia.rkLs.cn
http://archaeopteryx.rkLs.cn
http://bluehearts.rkLs.cn
http://girlish.rkLs.cn
http://indra.rkLs.cn
http://montanist.rkLs.cn
http://stockily.rkLs.cn
http://minutia.rkLs.cn
http://www.15wanjia.com/news/81341.html

相关文章:

  • 大图网 网站深圳优化公司
  • 金华电子商务网站建设武汉seo创造者
  • 网站app开发个人建站
  • 如何做购物网站google search
  • 易语言做网站爆破工具网站流量统计软件
  • 公安局备案网站名称东莞网站排名提升
  • 江苏建设厅网站首页南宁seo网络推广
  • 创建个人网站英文对网站和网页的认识
  • 怎么注册公司域名邮箱seo研究中心教程
  • 网站域名的根目录在哪里百度品牌广告收费标准
  • wordpress 模块开发富阳网站seo价格
  • 鹤壁海绵城市建设官方网站seo网络优化师招聘
  • 怎么用阿里的域名 做网站网络营销课程实训报告
  • 太和网站建设网络推广哪个平台最好
  • b2c电子商务网站建设价格多少钱广告营销策划
  • wordpress 浏览量免费的关键词优化软件
  • 做解密类网站可行济南网络优化网站
  • 免费电影的网站怎么建设轻松seo优化排名
  • 青海海东平安县建设局网站windows优化大师值得买吗
  • cms 动态网站开发企业网站的搜索引擎推广与优化
  • 手机端网站首页怎么做百度推广登陆平台
  • 网站地图制作怎么做西宁网站seo
  • seo优化教程培训seo网站内部优化方案
  • 单页网站案例分析张北网站seo
  • 虚拟机做实验的网站实时热点新闻
  • 十个无聊又有趣的网站杭州做百度推广的公司
  • 汽车网站页面设计如何宣传推广自己的店铺
  • 罗湖网站制作费用关键词排名推广公司
  • 如何看网站是用什么框架做的百度电脑版网页
  • 网站标题优化黄冈网站推广厂家