1、a标签与a标签之间有3px距离

2、标准流中的文字不会被浮动的盒子遮挡

<div style="width:150px;height:150px;background-color:yellow;float:left"></div>
<div style="width:150px;height:50px;background-color:red;">
<span>我的盒子跑到了红色盒子下面,但是我还留在这儿</span>
</div>

红色虽然走了,但是没有带有文字

3、浮动的父盒子要尽量设置宽高。下面代码父盒子设置了宽和浮动,但是没有设置高,所以影响了下面的黄盒子布局。所以浮动的盒子要撑开盒子(没有设置高)的话,就必须让父盒子设置高,让子盒子撑破父盒子是没有问题的。

<body>
<div style="width:1000px;height:50px;border:1px solid red;">
<div style="width:100px; background-color:red;float:left;">
<div style="width:100px;height:100px; background-color:black"></div>
</div>
</div>
<div style="width:200px;height:40px;background-color:yellow; float:left"></div>
</body>

4、谷歌浏览器不支持12px字体以下的字体大小

5、鼠标经过使div内的a标签变色

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.box {
width: 50px;
height: 50px;
background-color: blue;
} .box:hover {
background-color: white;
} .box:hover a {
color: red;
}
</style>
</head>
<body>
<div class="box">
<a>你好</a>
</div>
</body>
</html>

6、定位中的默认权限:left比right,权重高。有left又有right的时候,执行left的值。top比bottom,权重高。有top又有bottom的时候,执行top的值。

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
a{
position:absolute;
width:50px;
height:50px;
background-color:aliceblue;
top:50%;
margin-top:-25px;
text-align:center;
font:400 20px/50px "console";
}
.rg{
right:0px;
}
</style>
</head>
<body>
<div style="width:300px;height:300px;position:relative;z-index:-1; background-color:bisque;">
<div style="background-color:red;">
<a>&lt;</a>
<a class="rg">&gt;</a>
</div>
</div>
</body>
</html>

7、虚线与点线

border: 1px dotted #000;//圆点线
border: 1px dashed #000;//虚线

8、text-transform

h1 {text-transform:uppercase}//大写
h2 {text-transform:capitalize}//小写
p {text-transform:lowercase}//首字母大写

9 、a标签中的href属性

<a href="">content</a>//刷新本页
<a href="#">content</a>//跳到顶部,不刷新
<a href="javascript:void(0)">content</a>//阻断跳转,不刷新

10、占位图片:http://via.placeholder.com/350x150

html——特例的更多相关文章

  1. C# 引用类型之特例string

    在C#编程的时候经常会使用字符串(string)类型,它也是引用类型,但是处处都不作为引用的用法来使用,实属特例,下来我一一罗列出来,供自己记忆方便: 1)字符串的直接赋值:本身字符串就是引用类型,应 ...

  2. [20180319]直接路径读特例12c.txt

    [20180319]直接路径读特例12c.txt --//昨天的测试突然想起以前遇到的直接路径读特例,在12c重复测试看看. 1.环境:SCOTT@test01p> @ ver1 PORT_ST ...

  3. Uva LA 3177 - Beijing Guards 贪心,特例分析,判断器+二分,记录区间内状态数目来染色 难度: 3

    题目 https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_pr ...

  4. MT【156】特例$a_n=\dfrac{6}{\pi n^2}$

    设无穷非负数列$\{a_n\}$满足$a_n+a_{n+2}\ge2 a_{n+1},\sum\limits_{i=1}^{n}{a_i}\le1$,证明:$0\le a_n-a_{n+1}\le\d ...

  5. B-spline Curves 学习之B样条曲线的系数计算与B样条曲线特例(6)

    B-spline Curves: Computing the Coefficients 本博客转自前人的博客的翻译版本,前几章节是原来博主的翻译内容,但是后续章节博主不在提供翻译,后续章节我在完成相关 ...

  6. Reverse Nodes In K Group,将链表每k个元素为一组进行反转---特例Swap Nodes in Pairs,成对儿反转

    问题描述:1->2->3->4,假设k=2进行反转,得到2->1->4->3:k=3进行反转,得到3->2->1->4 算法思想:基本操作就是链表 ...

  7. 特例模式(Special Case Pattern)与空对象模式(Null Pointer Pattern)—— 返回特例对象而非 null

    返回 null 值,基本上是在给自己增加工作量,也是给调用者添乱.只有一处没有检查返回的是否为 null,程序就会抛 NullPointerException 异常. 如果你打算在方法中返回 null ...

  8. C++学习之模板特例化

    模板是C++中一个很重要的特性,写一份代码能用于多种数据类型(包括用户自定义类型).例如,STL的sort()函数可以用于多种数据类型的排序,类stack可以用作多种数据类型的栈.但是,如果我们想对特 ...

  9. 格伦布编码——rice编码无非是golomb编码M为2^x的特例

    格伦布编码 格伦布编码是一种无失真资料压缩方法,由数学家所罗门·格伦布在1960年代提出. Rice编码 Robert F. Rice提出Rice 编码,是以哥伦布编码为基础做改良而更简易的前置码.R ...

  10. 《深入实践C++模板编程》之四——特例

    1. 所谓模板特例,是针对符合某种条件的模板参数值集合另外声明的模板实现变体. template<typename T> class my_vector; template<> ...

随机推荐

  1. 【NJU749D】triple(莫比乌斯反演)

    题意: cas<=100 n<=10^5 思路:与两个数的没什么区别 F(d)=(n div d)*(n div d-1)*(n div d-2) div 6 再加上喜闻乐见的下底函数分块 ...

  2. Hihocoder 1325 (splay)

    Problem 平衡树 Treap 题目大意 维护一个数列,支持两种操作. 操作1:添加一个数x. 操作2:询问不超过x的最大的数. 解题分析 尝试了一下用指针来写splay,感觉写起来还是比较流畅的 ...

  3. D - Guess UVALive - 4255 拓扑排序

    Given a sequence of integers, a1, a2, . . . , an, we define its sign matrix S such that, for 1 ≤ i ≤ ...

  4. Weakness and Poorness CodeForces - 578C 三分搜索 (精度!)

    You are given a sequence of n integers a1, a2, ..., an. Determine a real number x such that the weak ...

  5. I - 最少拦截系统

    #include<stdio.h> #include<string.h> #include<algorithm> using namespace std; ],su ...

  6. 关于SVN版本冲突问题

    版本冲突原因: 假设A.B两个用户都在版本号为100的时候,更新了kingtuns.txt这个文件,A用户在修改完成之后提交kingtuns.txt到服务器,这个时候提交成功,这个时候kingtuns ...

  7. HDU1026 Ignatius and the Princess I 【BFS】+【路径记录】

    Ignatius and the Princess I Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (J ...

  8. HDOJ 5383 Yu-Gi-Oh! 最大费用最大流

    网络流裸题: 分两部分建图,求不要求满流的最大费用最大流..... Yu-Gi-Oh! Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: ...

  9. 性能测试实战-XYB项目-内网访问

    使用内网服务器,linux host绑定域名,相当于ip地址+域名的host绑定,只不过这里的ip是yc-sparks.schoolis.cn

  10. hdu 1799 (循环多少次?)(排列组合公式)

    循环多少次? Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Sub ...