1.The customising link

We can change the link's style when we move our pointer on the link like that:

1.1 The " text-decoration:none "means remove the underline !

a:hover{
color: black;
background-color: red;
text-decoration: none;
}

1.2 Why should we customise links?

To emphasise to the user where the links are.

1.3 What is the purpose of a CSS selector?

It connects a set of CSS properties to things in the HTML document.

1.4 a:hover is a CSS selector to select links that the user is hovering over and we can set a different set of style properties for the link when the user moves the mouse over it.

 

2.Layout Control

U can set  classes on anything, and actually if u define the class u can use the class to a different tags .

And we can set any bit text we want. Especially when we use the span class which allow us to cut in .

like that :

.indent {
margin-left: 50px;
}
.gap_bellow{
margin-bottom: 100px;
}
<h1 class = "gap_bellow"><span class = "indent">This is my first page!</span>This is my first page!This is my first page!This is my first page!This is my first page!This is my first page!This is my first page!This is my first page!This is my first page!This is my first page!This is my first page!This is my first page!This is my first page!This is my first page!This is my first page!This is my first page!</h1>

3.CSS Media Queries

Responsiveness can be implemented in CSS with something called CSS Media Queries.

1. The code means let the body's background color be green when brower's window has minimum width 1000px  

And we call the " min-width : 1000px " test !

@media(min-width:1000px){
body{
background: green;
}
}

2016 - 1 - 25 CSS初步 (二)的更多相关文章

  1. 2016 - 1 - 24 CSS初步

    1.The difference between CSS and HTML HTML document is that it specities the content of the page. An ...

  2. 一起看看2016中国第三届CSS开发者大会有哪些大咖演讲

    中国第三届CSS开发者大会于2016年12月17日在广州举办.由W3C.w3ctech.前端圈主办.本次大会我们将邀请行业内知名讲师,与大家共聚广州,畅聊CSS. 快捷报名通道:http://www. ...

  3. 前端总结·基础篇·CSS(二)视觉

    前端总结系列 前端总结·基础篇·CSS(一)布局 前端总结·基础篇·CSS(二)视觉 前端总结·基础篇·CSS(三)补充 前端总结·基础篇·CSS(四)兼容 目录 一.动画(animation)(IE ...

  4. css入门二-常用样式

    css入门二-常用样式总结 基本标签样式 背景色background-color 高度height; 宽度width; 边框对齐以及详细设定举例 width/*宽度*/: 80%; height/*高 ...

  5. 基本CSS布局二

    基本CSS布局二------基本页面布局二 /*主面板样式*/ #container { width:100%; margin:0px auto;/*主面板DIV居中*/ } /*顶部面板样式*/ # ...

  6. 2016.8.25 JavaScript入门之二

    1.字符串中,引用字符串:要用/"转换: 例如:var myStr="I am a \"double quoted\" string inside \" ...

  7. 2016/2/25 html+css学习资源

    html+css学习资源 1.Position is Everything,一个描述和展示在各种浏览器中发现的bug,并提供css解决方法的网站,顶! 2.一个国外的网页设计论坛 3.http://c ...

  8. 2016/1/25 多线程 作业 方法一 继承Thread 方法二 实现Runnable 多线程笔记

    /* * 1,尝试定义一个继承Thread类的类,并覆盖run()方法, * 在run()方法中每隔100毫秒打印一句话.*/ package Stream; //方法一 继承Thread 实现多线程 ...

  9. HTML/CSS初步了解

    一.CSS是什么? 它是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言.CSS为HTML标记语言提供了一种样式描述,定义了其中元素的显示 ...

随机推荐

  1. pom.xml里有红叉报错的解决办法

    pom.xml里有红叉报错的解决办法一: 1.把鼠标点在报的错上发现pom.xml报如下错误: Multiple annotations found at this line: - Failure t ...

  2. 小tip:关于typeof,instanceof,toString(),valueOf(),toLocaleString(),join(),reverse(),sort(),pop(),push(),shift(),unshift()

    typeof:用于检测一个变量是否是基本数据类型.instanceof用于检测某引用对象是什么类型的对象. var s = "Nicho"; var b = true; var n ...

  3. 浅谈对Js闭包的理解

    理解Js的闭包,首先让我们先看几个概念 执行环境(executive environment)每个函数都有自己的执行环境,匿名函数默认为全局环境. 作用域链(scope chain)子函数继承父函数, ...

  4. FlexBox标准及兼容写法速查表

    FlexBox标准写法: 支持浏览器: IE11,  Chrome29+, FireFox 20+, Safari加前缀 -webkit- 概述: 总的来说就是12个属性; 关于容器的6个,5个单一属 ...

  5. excel 两列比较内容是否相同

    C1列输入   =IF(A1=B1,"","不同") 然后下拉以比较其他行

  6. @Transactional 事务管理

    全面分析 Spring 的编程式事务管理及声明式事务管理 事务传播行为 所谓事务的传播行为是指,如果在开始当前事务之前,一个事务上下文已经存在,此时有若干选项可以指定一个事务性方法的执行行为.在Tra ...

  7. jboss设置图片上传大小

    <http-listener name="default" socket-binding="http" max-post-size="10485 ...

  8. 非对称加密算法--DH

    注意:本节内容主要参考自<Java加密与解密的艺术(第2版)>第8章“高等加密算法--非对称加密算法” 11.1.非对称加密算法 特点: 发送方和接收方均有一个密钥对(公钥+私钥),其中公 ...

  9. Windows Store App 全球化 设置指定页面的语言

    上一小节介绍了通过在应用程序中添加语言设置选项来改变整个应用显示信息的语言,而有时用户只想对应用中某一页面信息的语言进行调整,这时就不能使用上一小节所讲述的知识来对应用进行设置.下面将通过一个示例介绍 ...

  10. 在ubuntu中安装psutil

    环境:ubuntu 16.04 LTS + python 2.7/3.5共存 + psutil 4.3.0 1.sudo apt-get install python3-dev # 先把python3 ...