大屏展示 NO1(区域设计)

大屏展示 区域设计

区域设计

大致的分布图为:在这里插入图片描述

实现

格局
由于整个页面要跟随屏幕的大小来改变其尺寸,所以不能写死,在屏幕大小的基础上来设定,(由父级样式继承尺寸)。
多用到{
display: flex;
align-items: center;
justify-content: space-between;
}
框架代码如下:
下面展示一些 内联代码片
// Dom
<div class="home">
<div class="left">
	<div class="left-button">
		<!-- <svg class="icon myIconStyle" aria-hidden="true">
			<use xlink:href="#icon-langchaoyun"></use>
			</svg> -->
		<button class="buttons" @click="changeState(30)" ref="b30">
			<svg class="icon myIconStyle" aria-hidden="true">
			<use xlink:href="#icon-yuepao-copy"></use>
			</svg>
		</button>
		<button class="buttons" @click="changeState(90)" ref="b90">
			<svg class="icon myIconStyle" aria-hidden="true">
			<use xlink:href="#icon-jipao-copy"></use>
			</svg>
		</button>
		<button class="buttons" @click="changeState(365)" ref="b365">
			<svg class="icon myIconStyle" aria-hidden="true">
			<use xlink:href="#icon-nianpao-copy"></use>
			</svg>
		</button>
		<button class="buttons" @click="changeState('our')" ref="bour">
			<!-- <svg class="icon myIconStyle icon-quanbu1" aria-hidden="true">
			<use xlink:href="#icon-quanbu1"></use>
			</svg> -->
			<span class="Our">全</span>
		</button>
	</div>
	<div id="leftMain">
		<left ></left>
	</div>
</div>
<div class="center">
	<center  :visualMapminmax="visualMapminmax"></center>
</div>
</div>
//  css
.home{
	width: 100%;
	height: 100%;
	position: absolute;
	top: 0;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: url('../assets/jpg/1222.jpg')no-repeat;
	background-size: cover;
	.left{
		width: 100%;
		height: 100%;
		// border: 1px solid red;
		.left-button{
			width: 100%;
			height: 10%;
			// border: 1px solid red;
			display: flex;
			align-items: center;
			justify-content: center;
			.buttons{
				margin-left: 10px;
				width: 80px;
				height: 80px;
				display: block;
				background-color: #008682;
				border: 1px solid transparent;
				border-radius: 50%;
				.myIconStyle{
					width: 100%;
					height: 100%;
				}
				.Our{
					position: relative;
					top: -4px;
					font-size: 50px;
					color: white;
				}
			}
		}
		#leftMain{
			width: 100%;
			height: 88%;
		}
	}.center{
		width: 100%;
		height: 100%;
		// border: 1px solid green;
	}
}

注: 由于父级继承,在Echarts实例化中 ,同样要设置单个的尺寸,否则显示不出来,
图中的svg图片,是在阿里巴巴iconfont项目中的Symbol引用,在public中的index.html中用script标签载入在线链接。 样式可在svg标签中添加自己的class,来单独设立样式,(颜色不能改,可以直接在阿里巴巴iconfont项目中改,存为副本或其他;;)

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

轻动琴弦

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值