1.用伪元素实现

.border_1px_top{
position:relative;
}

.border_1px_top:before{
content: "";
position:absolute;
left:0;
top:0;
right:-100%;
bottom:-100%;
-webkit-transform: scale(0.5);
-webkit-transform-origin: 0px 0px;
border-top:1px solid #e6e6e6;
pointer-events: none;

}

2.border-image实现

<div class="border1">案例一:我是border-image实线</div>

.border1{
border-style:solid;
-webkit-border-image:url(../image/border_image_solid.png) 2 repeat;
border-width:1px;
}

1px的实现方法的更多相关文章

  1. IE/Chrome背景图片居中1px偏移解决方法

    最近在支持行业运营的一个推广页面,遇到了非常规的页面banner图居中的问题,为了解决此问题,做了简单的测试,做了一个小结,为经常做大促页面的兄弟姐妹们提供参考解决方案. 首先来看看现象.最经典的页面 ...

  2. 移动端1px问题处理方法

    在做移动端开发时,设计师提供的视觉稿一般是750px,当你定义 border-width:1px 时,在iphone6手机上却发现:边框变粗了.. 这是因为,1px是相对于750px的(物理像素),而 ...

  3. 未知宽高div水平垂直居中3种方法

    <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> </head&g ...

  4. CSS(3)多种方法实现水平垂直居中效果

    CSS实现水平垂直居中对齐 在CSS中实现水平居中,会比较简单.常见的,如果想实现inline元素或者inline-block元素水平居中,可以在其父级块级元素上设置text-align: cente ...

  5. css布局------块元素水平垂直居中的四种方法

    HTML <div class="parent answer-1"> <div></div></div> CSS .parent { ...

  6. 小div在大div里面水平垂直都居中的实现方法

    关于如何设置小盒子在大盒子里面水平垂直方向同时居中的实现方法有很多种,下面仅列举了常用的几种. 首先看一下要实现的效果图及对应的html代码: <div class="parent&q ...

  7. 未知宽高div水平垂直居中的3种方法

    方法一 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8 ...

  8. margin塌陷现象

    如果两个盒子是包含关系,如果让子盒子在父盒子之内向下平移100px:(margin塌陷现象)解决方案: padding , border , overflow <!DOCTYPE html> ...

  9. 小 div在大 div中左右上下居中

    <!DOCTYPE HTML><html><head> <meta http-equiv="Content-Type" content=& ...

随机推荐

  1. weblogic安装教程(以weblogic 11g为例)

    1.下载jdk和weblogic安装介质 一般的搭配是jdk1.5+weblogic92.jdk1.6+weblogic11g(weblogic10.3.6) jdk历史版本下载链接:http://w ...

  2. Java 类名.class与类名.this 的区别?

    “类名.this”的语法在Java语言中叫做“qualified this”.相关规定在这里:Chapter 15. Expressions - Qualified this这个语法的主要用途是:在内 ...

  3. 搜索路径---PYTHONPATH 变量

  4. laravel中的注册页面

    <?php namespace App\Http\Controllers; use App\User; use Illuminate\Http\Request; class RegisterCo ...

  5. Java中数据类型相互转化

    1 将String 转换成int? A. 有两个方法: 1). int i = Integer.parseInt([String]); 或 i = Integer.parseInt([String], ...

  6. day038 navicat pymysql

    今日内容: 1.navicat 2.pymysql 1.navicat 需要掌握 #1. 测试+链接数据库 #2. 新建库 #3. 新建表,新增字段+类型+约束 #4. 设计表:外键 #5. 新建查询 ...

  7. flask项目结构(三)使用蓝图

    简介: Flask中的蓝图旨在针对这些情况: 把一个应用分解成一系列的蓝图.对于大型的应用是理想化的:一个项目能实例化一个应用, 初始化一些扩展,以及注册一系列的蓝图. 以一个 URL 前缀和/或子域 ...

  8. 前端之Bootstrap框架

    一.Bootstrap介绍 Bootstrap是Twitter开源的基于HTML.CSS.JavaScript的前端框架. 它是为实现快速开发Web应用程序而设计的一套前端工具包. 它支持响应式布局, ...

  9. pymongo 对mongoDB的操作

    #文档地址 http://api.mongodb.com/python/current/api/pymongo/collection.html collection级别的操作: find_and _m ...

  10. L266 作文

     With the rapid development of modem society, an increasing number of people are concerned about the ...