倒计时 time { font size: 40px; color: red; text align: center; margin top: 100px; } window.onload = function () { // 1. 获取标签 var time = document.getEleme ...
分类:
其他好文 时间:
2019-09-02 14:17:07
阅读次数:
66
python库常用函数及举例: <!--[if !supportLists]-->2. <!--[endif]-->取大于等于x的最小的整数值,如果x是一个整数,则返回x>>> math.ceil(4.12)5 <!--[if !supportLists]-->3. <!--[endif]-->把y ...
分类:
编程语言 时间:
2019-08-31 23:25:15
阅读次数:
238
需求:一块宽高固定的区域,采用九宫格展示信息,要求有边框1px的细边框 方法一、采用margin-left:-1px;和margin-top:-1px; - 用一个边框覆盖另一个边框,形成1px的边框 方法二、采用伪元素+定位,不占位 如果有更好的办法,欢迎留言 ...
分类:
其他好文 时间:
2019-08-29 00:04:43
阅读次数:
94
效果图,图片始终处于这个位置。 代码 <style> #NavTop { width: 140px;/*图片盒子的宽度 右移*/ height: 250px; margin-top: 50px; position: fixed; right: 0px; top: 200px; /*固定位置,右浮动, ...
分类:
其他好文 时间:
2019-08-22 11:14:56
阅读次数:
110
垂直居中的几种方法 html结构 css 1. 使用flex布局 在父容器中设置 2. 绝对定位 分为已知宽高和未知宽高两种情况 已知宽高都是100px,设置自身为绝对定位(absolute),top和left为50%,margin left、margin top为自身的一半,也就是50px 未知宽 ...
分类:
Web程序 时间:
2019-08-20 22:25:48
阅读次数:
127
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <style> * { margin: 0; padding: 0; } input { margin-top: 20px; } div ...
分类:
其他好文 时间:
2019-08-06 10:50:21
阅读次数:
123
title = response.xpath('//h2[@class="margin-top-0"]/a/text()') read_num = response.xpath('//div[@class="col-md-12"]/p[@class="text-muted"]/small/text(... ...
分类:
Web程序 时间:
2019-07-31 21:37:10
阅读次数:
114
覆盖是一种常用的策略,也是一种不太优雅的方式,如下代码,为了让每个house中间的20px的间距,但是第一个house不要有间距: .house{ margin-top: 20px; } .house:first-child{ margin-top: 0; } 复制代码 其实可以改成这样: .hou ...
分类:
Web程序 时间:
2019-07-09 09:23:26
阅读次数:
111
直接看代码就能理解了 结果如下: 在top: 50%;和left: 50%;的基础上,通过设置margin-top: -50px;和 margin-left: -50px;,就能使得子部件的轴线和parent轴线重合 ...
分类:
其他好文 时间:
2019-07-06 17:30:12
阅读次数:
94
#blogTitle h1 { font-size: 150%; font-weight: bold; line-height: 1.5em; margin-left: 1em; margin-top: 10px; width: 50%; float: left; display: none; le... ...
分类:
Web程序 时间:
2019-06-13 15:49:33
阅读次数:
120