一键生成响应式表格

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

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 安装指南

阅读全文

Vscode 配置 Wsl 并配置 Node 环境

  1. 下载 WSL Guideline,里面会有配置安装 wsl 相关说明

  2. 切换终端到 wsl

阅读全文

Web 性能优化 —— 首屏优化

花了两周多,终于完成了一个基本无 bug 的项目,但是有个比较大的问题就是:在 webpack 测试环境下,编译时间太久了,app.js 太大了,导致页面初始化极其的慢,虽然说正式环境下不会有这个问题,同事也说测试环境 1000 kb 左右正常,不用优化,但是自己的页面打开慢还是让人感到极其不爽的,花了两个钟左右,我把 app.js 从 1983 kb 缩小到了 1083 kb,压缩之后为 273 kb,首屏运行速度从原来的可能要十多秒,提升到了 166 ms,我是怎么做到这些的呢?主要策略如下:

阅读全文