flex 布局 计算器
flex布局计算器
<!doctype html>
<html>
<head>
<style>
.box{
display: flex;
flex-direction: column;
height: 95vh;
background-color: #f1f3f3;
}
.box-content{
width:100%;
flex: 1;
} .btns-rows{
width: 100%;
flex: 1;
display: flex;
flex-direction: row;
background-color: #f7f8f9;
}
.btn{
text-align: center;
box-sizing: border-box;
flex: 1;
display: flex;
justify-content: center;
align-items: center;
border-top: 1px solid #c3c6c7;
}
.btn:not(:last-child){
border-right: 1px solid #c3c6c7;
}
.box-btns{
width: 100%;
flex: 1;
display: flex;
flex-direction: column;
} .btns-rows-left1{
flex: 3;display: flex;flex-direction: column;
}
.btns-rows-left2{
display: flex; flex-direction: row;flex-grow: 1;
}
#btns2{
flex: 2;display: flex;flex-direction: row;
}
#btns2-right{
border-left: 1px solid #c3c6c7;
}
.btn:active{
background-color: #888;
}
</style>
</head>
<body>
<div class="box">
<div class="box-content">
</div>
<div class="box-btns">
<div class="btns-rows">
<div class="btn">AC</div>
<div class="btn">DEL</div>
<div class="btn">/</div>
<div class="btn">*</div>
</div>
<div class="btns-rows">
<div class="btn">7</div>
<div class="btn">8</div>
<div class="btn">9</div>
<div class="btn">-</div>
</div>
<div class="btns-rows">
<div class="btn">4</div>
<div class="btn">5</div>
<div class="btn">6</div>
<div class="btn">+</div>
</div> <div id="btns2" class="btns-rows">
<div class="btns-rows-left1">
<div class="btns-rows-left2">
<div class="btn">1</div>
<div class="btn">2</div>
<div class="btn">3</div>
</div>
<div class="btns-rows-left2">
<div class="btn">%</div>
<div class="btn">0</div>
<div class="btn">.</div>
</div>
</div>
<div id="btns2-right" class="btn">=</div>
</div> </div>
</div>
</body>
</html>
flex 布局 计算器的更多相关文章
- Flex 布局教程:语法篇
作者: 阮一峰 网页布局(layout)是CSS的一个重点应用. 布局的传统解决方案,基于盒状模型,依赖 display属性 + position属性 + float属性.它对于那些特殊布局非常不方便 ...
- Flex 布局教程:实例篇
该教程整理自 阮一峰Flexible教程 今天介绍常见布局的Flex写法.你会看到,不管是什么布局,Flex往往都可以几行命令搞定. 我的主要参考资料是Landon Schropp的文章和Solved ...
- 在移动端中的flex布局
flex布局介绍: flex布局很灵活, 这种布局我们也可以称之为弹性布局, 弹性布局的主要优势就是元素的宽或者高会自动补全; flex布局实例: 比如有两个div,一个div的宽度为100px, ...
- css flex布局
关于flex布局的一些简单用法 效果(下图) 实现代码: <!--html--> <div class="wrap"> <div class=&quo ...
- FLEX布局的一些问题和解决方法
前言 露珠最近研究了一下flex的布局方式,发现项w3c推出的这套布局解决方案对于日益复杂的前端开发布局来说是确实是一利器,并且在不同的屏幕上实现了真正的响应式布局:不再单纯地依赖百分比和float的 ...
- CSS之flex布局
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name ...
- flex布局示例
来自:授权地址 作者:水牛01248 几个横排元素在竖直方向上居中 display: flex; flex-direction: row;//横向排列 align-items: center;//垂直 ...
- 【转】Flex 布局语法教程
网页布局(layout)是CSS的一个重点应用. 布局的传统解决方案,基于盒状模型,依赖 display属性 + position属性 + float属性.它对于那些特殊布局非常不方便,比如,垂直居中 ...
- [flex布局]-flex教程
简介:2009年,W3C提出了一种新的方案----Flex布局,可以简便.完整.响应式地实现各种页面布局.目前,它已经得到了所有浏览器的支持,这意味着,现在就能很安全地使用这项功能. Flex布局是什 ...
随机推荐
- TableView下拉刷新崩溃解决办法
return cell;上边加判断 if(self.dataArray.count<1){ return cell; }
- python3入门教程
python : 3.5 jdk : 1.7 eclipse : 4.5.2(有点低了,需要对应Neon 4.6,不然总是会弹出提示框) 应该学习最新版本的 Python 3 还是旧版本的 Pytho ...
- [z]oracle 创建job
https://www.cnblogs.com/lijiasnong/p/3382578.html alter system enable restricted session;--创建表create ...
- MongoDB安装成为Windows服务及日常使用遇到问题总结
安装MongoDB: http://blog.csdn.net/liuzhoulong/article/details/6124566 严格按照上面的步骤,设置数据库目录,设置日志目录,安装服务.可是 ...
- 9.12 h5日记
9.12 知识点补充: 属性继承例子,color.font(font-size/style/family/weight) 1.浏览器的默认字体大小是16px,谷歌浏览器的最小字体是10px,其他浏览器 ...
- php 多进程
php 在使用场景中一般是处理web应用,所以多进程使用不适合在web中使用,且php-fpm中pcntl_fork不能使用,所以使用场景是在cgi模式下 一个进程调用pcntl_fork函数后,系统 ...
- accept与epoll惊群 转载
今天打开 OneNote,发现里面躺着一篇很久以前写的笔记,现在将它贴出来. 1. 什么叫惊群现象 首先,我们看看维基百科对惊群的定义: The thundering herd problem occ ...
- Array Division 808D
D. Array Division time limit per test 2 seconds memory limit per test 256 megabytes input standard i ...
- spring batch遇到的一些问题
1.Spring Batch - A job instance already exists: JobInstanceAlreadyCompleteException 这是因为JobParameter ...
- mysql 8小时timeout问题
MySQL> show variables like '%timeout%'; +--------------------------+-------+ | Variable_name ...