CSS2 下块级元素垂直水平居中

前几天有人问我给定一个这样的结构:div => div,如何让里面的元素水平垂直居中?给出 css2 代码。这对于一直用 css3 布局方式的我来说,一时还有点蒙蔽,只知道左右居中一般用 margin:0 auto,至于垂直居中,还真没用 css2 实现过。于是动手实践,发现以下的方式而已完美达到想要的效果。

阅读全文

Centos7 安装 MySQL

centos7 安装 MySQL

阅读全文

一键生成响应式表格

这是一个一键生成响应式表格的方案。

table {
width: 100%;
border-collapse: collapse;
text-align: center;
line-height: 40px;
table-layout: fixed;
color: #333;
font-weight: normal;
font-size: 14px;
margin: 5% 0;
td{
padding: 10px;
}
thead {
background-color: #cce5ff;
font-weight: 500;
}
}

table-bordered {
border: 1px solid #e0e0e0;
}

.table-bordered {
th {
background: #e4efff;
border: 1px solid #e0e0e0;
font-weight: normal;
height: auto;
}
td {
background: #e4efff;
border: 1px solid #e0e0e0;
font-weight: normal;
height: auto;
}
thead {
th {
border-bottom: 1px;
font-weight: 500;
height: auto;
}
td {
border-bottom: 1px;
font-weight: 500;
height: auto;
}
}
}

阅读全文

网页或Html元素在浏览器上全屏解决方案

  1. 全屏是什么

    个人理解,全屏指的是去掉浏览器的导航栏,浏览器的全部空间被页面所占有,网页即 html 文档,网页全屏即 dom 全屏

  2. 不同的浏览器又不同的全屏事件可以调用,但是不同浏览器的全屏事件并不一致,因为还没被写入规范中,所以需要判断在特定的浏览器下,哪个事件可以用,以下是全屏事件的封装:

阅读全文

Key 值在 Vue 组件中的作用

key 值在 vue 组件的作用

阅读全文

前端绘制图形验证码

摘要:
本文主要实现了一下功能:1、图形验证码由验证码、干扰线、干扰点组合而成;2、验证码由数字和字母随机组合形成;3、每次切换验证码,验证码字体颜色和背景颜色变化

一、实现思路

  1. 生成一个随机色,用于切换验证码时控制字体颜色和背景颜色

阅读全文

火狐删除各种虚线框

  1. 删除按钮虚线框

    <!-- 火狐浏览器,去除按钮虚线框 -- > 
    button::-moz-focus-inner,
    input[type='reset']::-moz-focus-inner,
    input[type='button']::-moz-focus-inner,
    input[type='submit']::-moz-focus-inner,
    input[type='file'] > input[type='button']::-moz-focus-inner {
    border: none;
    }

阅读全文

CSS 基础

css 基础知识笔记,包括专业术语介绍、css 流概述等,具体内容可以查看全文

阅读全文

Html 笔记

html 笔记

阅读全文

Python3 安装

python3 安装指南

阅读全文