1像素border
1像素border 利用伪类和媒体查询:
伪类:
border-1px($color)
position:relative
&:after
display: block
position: absolute
left: 0
bottom: 0
width: 100%
border-bottom: 1px solid $color
content: ' '
&:before
display: block
position: absolute
left: 0
top: 0
width: 100%
border-top: 1px solid $color
content: ' '
媒体查询 定义全局样式border-1px
@media (-webkit-min-device-pixel-ratio: 1.5),(min-device-pixel-ratio: 1.5)
.border-1px
&::after
-webkit-transform: scaleY(0.7)
transform: scaleY(0.7)
&::before
-webkit-transform: scaleY(0.7)
transform: scaleY(0.7) @media (-webkit-min-device-pixel-ratio: 2),(min-device-pixel-ratio: 2)
.border-1px
&::after
-webkit-transform: scaleY(0.5)
transform: scaleY(0.5)
&::before
-webkit-transform: scaleY(0.5)
transform: scaleY(0.5)
1像素border的更多相关文章
- vue2.0:(六)、移动端像素border的实现和整合引入less文件
知识点一.如何在手机上看我们制作的移动端页面. 正常我们在电脑上都是按如下图来制作手机页面的: 如果要在手机上面看就不能用localhost了.所以,进入命令行,输入ipconfig查看本地ip地址: ...
- 使用min-device-pixel-ratio媒体功能实现真正的1像素border
关于设备像素比的知识,想必做过移动端开发的都有接触,这里就不介绍啦,万一有不懂的可以看张鑫旭大神的设备像素比devicePixelRatio简单介绍 由于设备像素比存在的原因,我们在处理设计图的一些边 ...
- 实现 1像素border
border-1px($color) position: relative &:after display: block position: absolute left: 0 bottom: ...
- 1像素border的实现(vue.js)
- border 0px和border none的区别
border:0px这个表示的是边框为0像素,表示边框的像素 border:none 这个表示无边框(边框的绘制方式),边框的绘制方式有很多种:solid dashed等等
- 解决移动端1px的问题,设备像素比devicePixelRatio的应用
本文主要针对移动端1物理像素问题展开 解决这个问题先要了解一下概念: CSS像素(CSS Pixel):(通俗说:样式中写的值)就是我们在样式代码中常写的逻辑像素,是一个抽象概念,实际并不存在 设备独 ...
- 项目vue2.0仿外卖APP(四)
组件拆分 先把项目搭建时生成的代码给清了吧 现在static目录下引入reset.css 接着在index.html引入,并且设置<meta> 有时候呢,为了让代码符合我们平时的编码习惯, ...
- 常用[js,css,jquery,html]
目录: 一.javascript事件和属性 二.jquery事件和方法 三.js 四.css 五.html 六.js操作cookies 七.插件 javascript事件和属性 事件 onblur ...
- 【移动适配】移动Web怎么做屏幕适配(三)
复杂纷扰的世界背后,总会有万变不离其宗的简单规则 啃先生 Mar.8th.2016 壹 | Fisrt 前面写了两篇移动适配相关的文章: <移动Web怎么做屏幕适配(一)>重点介绍了怎样利 ...
随机推荐
- POI精确设置Excel的行高和列宽
EXCEL的行高度和列宽度单位是不一样的. 1,EXCEL列高度的单位是磅,Apache POI的行高度单位是缇(twip): 1英寸=72磅=25.4毫米=1440缇1磅=0.353毫米=20缇 P ...
- 各种Helper代码
1.读取XML文件 /// <summary> /// 读取XML配置文件类 /// </summary> public class XmlHelper { private s ...
- CF708B Recover the String 构造
For each string s consisting of characters '0' and '1' one can define four integers a00, a01, a10 an ...
- linux上传与下载
首先必须安装xshell这个工具 使用xshell来操作服务非常方便,传文件也比较方便.就是使用rz,sz首先,服务器要安装了rz,szyum install lrzsz当然你的本地windows主机 ...
- C++使用using namespace std报错分析与解决方案
一句话概括,不能同时使用using 和include ***.h: 详细传送门:https://blog.csdn.net/m0_37876745/article/details/78565315
- adminLte 解决菜单栏 bug
<ul class="sidebar-menu" data-widget="tree"> 功能菜单 点击 不隐藏第三级 子菜单....在 ad ...
- Kibana6.x.x——导航权限控制入门
按如下图所示设置: 用该用户登录后,界面如图所示: 但遗憾的是,根据官方论坛的说法,其它的导航隐藏控制,暂时还不支持. 参考:https://discuss.elastic.co/t/hide-ina ...
- windows_study_4
描述:如何在虚拟外面访问虚机内的网站 解决:http://虚机ip.网站地址(http://192.168.124.41/wx/sites/tf/)
- java Sprint boot 学习之一
<properties> <project.build.sourceEncoding>UTF-</project.build.sourceEncoding> < ...
- my02_Atlas mysql5.7安装配置
软件环境:centos7.3,glib-2.49,lua5.1,Atlas2.2.1,mysql5.7 依赖包安装******************************************* ...