[css] 用css画出一把刻度尺

[css] 用css画出一把刻度尺

<div class='ruler'><div class='cm'><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div></div><div class='cm'><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div></div><div class='cm'><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div></div><div class='cm'><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div></div><div class='cm'><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div></div><div class='cm'><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div></div><div class='cm'><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div></div><div class='cm'><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div></div><div class='cm'><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div></div><div class='cm'><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div><div class='mm'></div></div><div class='cm'></div>
</div>
<div id="mentionme">by <a href="https://www.linkedin.com/in/artur-arsalanov-ab3a6895" target="_blank" title="Find me in  LinkedIn!">ArturArsalanov</a>
</div>
.ruler {position: relative;width: 70%;margin: 20px auto;height: 14px;
}
.ruler .cm,
.ruler .mm {position: absolute;border-left: 1px solid #555;height: 14px;width: 10%;
}
.ruler .cm:after {position: absolute;bottom: -15px;font: 11px/1 sans-serif;
}
.ruler .mm {height: 5px;
}
.ruler .mm:nth-of-type(5) {height: 10px;
}
.ruler .cm:nth-of-type(1) {left: 0%;
}
.ruler .cm:nth-of-type(1):after {content: "0";
}
.ruler .cm:nth-of-type(2) {left: 10%;
}
.ruler .cm:nth-of-type(2):after {content: "1";
}
.ruler .cm:nth-of-type(3) {left: 20%;
}
.ruler .cm:nth-of-type(3):after {content: "2";
}
.ruler .cm:nth-of-type(4) {left: 30%;
}
.ruler .cm:nth-of-type(4):after {content: "3";
}
.ruler .cm:nth-of-type(5) {left: 40%;
}
.ruler .cm:nth-of-type(5):after {content: "4";
}
.ruler .cm:nth-of-type(6) {left: 50%;
}
.ruler .cm:nth-of-type(6):after {content: "5";
}
.ruler .cm:nth-of-type(7) {left: 60%;
}
.ruler .cm:nth-of-type(7):after {content: "6";
}
.ruler .cm:nth-of-type(8) {left: 70%;
}
.ruler .cm:nth-of-type(8):after {content: "7";
}
.ruler .cm:nth-of-type(9) {left: 80%;
}
.ruler .cm:nth-of-type(9):after {content: "8";
}
.ruler .cm:nth-of-type(10) {left: 90%;
}
.ruler .cm:nth-of-type(10):after {content: "9";
}
.ruler .cm:nth-of-type(11) {left: 100%;
}
.ruler .cm:nth-of-type(11):after {content: "10";
}
.ruler .mm:nth-of-type(1) {left: 10%;
}
.ruler .mm:nth-of-type(2) {left: 20%;
}
.ruler .mm:nth-of-type(3) {left: 30%;
}
.ruler .mm:nth-of-type(4) {left: 40%;
}
.ruler .mm:nth-of-type(5) {left: 50%;
}
.ruler .mm:nth-of-type(6) {left: 60%;
}
.ruler .mm:nth-of-type(7) {left: 70%;
}
.ruler .mm:nth-of-type(8) {left: 80%;
}
.ruler .mm:nth-of-type(9) {left: 90%;
}
.ruler .mm:nth-of-type(10) {left: 100%;
}
#mentionme{  text-align:center;margin-top:10%;
}

个人简介

我是歌谣,欢迎和大家一起交流前后端知识。放弃很容易,
但坚持一定很酷。欢迎大家一起讨论

主目录

与歌谣一起通关前端面试题

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/413520.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

[css] 说说position:sticky有什么应用场景

[css] 说说position:sticky有什么应用场景 吸顶效果个人简介 我是歌谣&#xff0c;欢迎和大家一起交流前后端知识。放弃很容易&#xff0c; 但坚持一定很酷。欢迎大家一起讨论 主目录 与歌谣一起通关前端面试题

hdu 4738 Caocao's Bridges 求无向图的桥【Tarjan】

<题目链接> 题目大意&#xff1a; 曹操在长江上建立了一些点&#xff0c;点之间有一些边连着。如果这些点构成的无向图变成了连通图&#xff0c;那么曹操就无敌了。周瑜为了防止曹操变得无敌&#xff0c;就打算去摧毁连接曹操的点的桥。但是诸葛亮把所有炸弹都带走了&…

[css] 如何使用css给一个正方形添加一条对角斜线?

[css] 如何使用css给一个正方形添加一条对角斜线&#xff1f; background:linear-gradient(45deg,transparent 49.5%,deeppink 49.5%,deeppink 50.5%,transparent 50.5%);个人简介 我是歌谣&#xff0c;欢迎和大家一起交流前后端知识。放弃很容易&#xff0c; 但坚持一定很酷。…

SQL Server2014 SP2新增的数据库克隆功能

SQL Server2014 SP2新增的数据库克隆功能 原文:SQL Server2014 SP2新增的数据库克隆功能SQL Server2014 SP2新增的数据库克隆功能 创建测试库 --创建测试数据库 create database testtestuse testtest go --创建表 create table testtest(id int ,name varchar(20)) --插入数据…

[css] 举例说明CSS特性检测的方式有哪些?

[css] 举例说明CSS特性检测的方式有哪些&#xff1f; 原生的 supports 的性能肯定是最好的&#xff0c;而且无需引入外部 javascript &#xff0c;首推这个&#xff0c;但是无奈兼容问题&#xff0c;目前来看不是最好的选择。Modernizr 功能强大&#xff0c;兼容性好&#xff…

DIV布局、浮动

2018-08-17 float属性转载于:https://www.cnblogs.com/twinkle-star/p/9493415.html

工作328:uni-局部过滤器处理数据

toChangeLess(e){console.log(e)/* 过滤数据中的循环请求*/if(e0){return "不循环"}else if(e12345){return "周一到周五循环"}else if(e12345678){return "每日循环"}}运行结果

css ——行级元素与块级元素解析

一 . 先说说二者的本质区别吧&#xff1a; 行级元素是可以和其他元素处于一行&#xff0c;不用必须另起一行。块级元素是每个块级元素都是独自占一行&#xff0c;其后的元素也只能另起一行&#xff0c;并不能两个元素共用一行。 二 .下面看看各自的特点&#xff1a; 块级元素 1…

工作329:uni-数据为空不显示

<u-image v-if"tableData[item]!null" style"display: block;float: left;margin-left: 26rpx;margin-top: 26rpx;" width"120rpx" height"120rpx" :src"tableData[item]"></u-image>

vue.js框架:数组的各种变异方法

今天阅读vue官网的学习教程&#xff0c;看到一个观察数组的变异方法。变异方法&#xff1f;&#xff1f;&#xff1f;excuse me??什么东西&#xff1f;&#xff1f;guide就给了这么一堆东西&#xff1a; 原来这些方法如下&#xff1a; push() pop() shift() uns…

CodeForces - 894E Ralph and Mushrooms (强连通缩点+dp)

题意&#xff1a;一张有向图&#xff0c;每条边上都有wi个蘑菇&#xff0c;第i次经过这条边能够采到w-(i-1)*i/2个蘑菇&#xff0c;直到它为0。问最多能在这张图上采多少个蘑菇。 分析&#xff1a;在一个强连通分量内&#xff0c;边可以无限次地走直到该连通块内蘑菇被采完为止…

工作328:uni-两个页面对象传递

getDetailList(record){console.log(record)uni.navigateTo({url:../formdaliyList/formdaliyList?recordencodeURIComponent(JSON.stringify(record))})},onLoad(e){/* JSON.parse() */let obj JSON.parse(decodeURIComponent(e.record));console.log(obj)},

vue-js 特殊变量$event常识

背景 如果我们要阻止默认事件&#xff0c;在 chrome 等浏览器中&#xff0c;我们可能要写一个&#xff1a; event.preventDefault(); 而在 IE 中&#xff0c;我们则需要写&#xff1a; event.returnValue false; jquery &#xff0c;跨浏览器的实现&#xff0c;我们统一只…

七、线性表的链式存储结构

1、问题引入 开发数组类模板的原因在于&#xff1a;在创建基于顺序存储结构的线性表时&#xff0c;发现这样的线性表可能被误用&#xff0c;因为重载了数组访问操作符&#xff0c;使用时跟数组类似&#xff0c;但是线性表和数组有很大的区别&#xff0c;所以激发了新的需求&…

工作331:uni-修改未完成数据动态渲染

<view v-for"(item,index) in TaskUnComplete" class"u-m-b-12" style"margin-left:30rpx;margin-top: 76rpx;">未完成-{{index1}}条</view><view v-for"(item,index) in TaskUnComplete"><view style"padd…

使用vue-CLI构建vue工程项目

vue2是对新手很友好的MVVM框架&#xff0c;有完善的官方中文文档&#xff0c;阅读起来也非常容易理解&#xff0c;由浅入深&#xff0c;示例完整。同时官方也提供了一个开箱即用的 vue-cli 帮我们生成一个完整的项目框架。 vue.js 著名的全家桶系列, 包含了&#xff0c; vue-ro…

Confluence 6 在 Apache 或者系统级别阻止垃圾

如果一个垃圾发布机器人攻击你的 Confluence 站点&#xff0c;这些程序可能来自于同一个 IP 地址&#xff0c;或者是一个比较小范围的 IP 地址段。希望找到攻击者的 IP 地址&#xff0c;请参考 Apache access logs 中的实时内容同时找到这些攻击者攻击的页面。 例如&#xff0c…

工作332:uni-uview上传获取到对应数据

let lists [];// 通过filter&#xff0c;筛选出上传进度为100的文件(因为某些上传失败的文件&#xff0c;进度值不为100&#xff0c;这个是可选的操作)lists this.$refs.uUpload.lists// 如果您不需要进行太多的处理&#xff0c;直接如下即可console.log(lists)

layui select框代码实现自动下拉

因为项目有个字段需要根据输入匹配类似选项通过下拉框表现出来&#xff0c;然后点击选择... 项目使用的layui框架&#xff0c;这个框架有个缺点就是一些H5标签使不上用场&#xff0c;比如datalist...&#xff0c;所以只能尝试寻找它自带的下拉事件怎么用了 //代码自动点击 se…

Chino的数列

题解&#xff1a; 一道练代码能力的题目。。 首先很显然他是一道平衡树裸题 第5个操作是势能分析维护最大值最小值就可以了 另外设置虚点和noip2017队列那题一样&#xff08;不过我只写过线段树&#xff09; 具体细节&#xff1a; 1.内存池&#xff0c;要直接判断(!x) 因为可能…