2016 - 1 - 25 CSS初步 (二)
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初步 (二)的更多相关文章
- 2016 - 1 - 24 CSS初步
1.The difference between CSS and HTML HTML document is that it specities the content of the page. An ...
- 一起看看2016中国第三届CSS开发者大会有哪些大咖演讲
中国第三届CSS开发者大会于2016年12月17日在广州举办.由W3C.w3ctech.前端圈主办.本次大会我们将邀请行业内知名讲师,与大家共聚广州,畅聊CSS. 快捷报名通道:http://www. ...
- 前端总结·基础篇·CSS(二)视觉
前端总结系列 前端总结·基础篇·CSS(一)布局 前端总结·基础篇·CSS(二)视觉 前端总结·基础篇·CSS(三)补充 前端总结·基础篇·CSS(四)兼容 目录 一.动画(animation)(IE ...
- css入门二-常用样式
css入门二-常用样式总结 基本标签样式 背景色background-color 高度height; 宽度width; 边框对齐以及详细设定举例 width/*宽度*/: 80%; height/*高 ...
- 基本CSS布局二
基本CSS布局二------基本页面布局二 /*主面板样式*/ #container { width:100%; margin:0px auto;/*主面板DIV居中*/ } /*顶部面板样式*/ # ...
- 2016.8.25 JavaScript入门之二
1.字符串中,引用字符串:要用/"转换: 例如:var myStr="I am a \"double quoted\" string inside \" ...
- 2016/2/25 html+css学习资源
html+css学习资源 1.Position is Everything,一个描述和展示在各种浏览器中发现的bug,并提供css解决方法的网站,顶! 2.一个国外的网页设计论坛 3.http://c ...
- 2016/1/25 多线程 作业 方法一 继承Thread 方法二 实现Runnable 多线程笔记
/* * 1,尝试定义一个继承Thread类的类,并覆盖run()方法, * 在run()方法中每隔100毫秒打印一句话.*/ package Stream; //方法一 继承Thread 实现多线程 ...
- HTML/CSS初步了解
一.CSS是什么? 它是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言.CSS为HTML标记语言提供了一种样式描述,定义了其中元素的显示 ...
随机推荐
- 20169212《Linux内核原理与分析》第六周作业
视频学习 一.用户态.内核态和中断 内核态:处于高的执行级别下,代码可以执行特权指令,访问任意的物理地址,这时的CPU就对应内核态 用户态:处于低的执行级别下,代码只能在级别允许的特定范围内活动.在日 ...
- Linux虚拟机中 Node.js 开发环境搭建
Node.js 开发环境搭建: 1.下载CentOS镜像文件和VMWare虚拟机程序; 2.安装VMWare——>添加虚拟机——>选择CentOS镜像文件即可默认安装带有桌面的Linux虚 ...
- Jesen不等式
- 简化版c语言文法
<程序> → <外部声明> | <程序的外部声明> <标识符类型> → <无类型> | <字符> | <整型> | ...
- 荣品RP4412开发板烧写内核cannot load出错的原因
问:荣品RP4412开发板烧写必须要配置Xmanager吗? 现在我烧写内核出现这个错误是什么原因呢? 答:4412文件夹下没有zImage这个文件, 你打开4412这个文件夹. 你都拼写错了, zI ...
- 如何在脚本中获取进程ID(PID)
我想要知道运行中脚本子shell的进程id.我该如何在shell脚本中得到PID. 当我在执行shell脚本时,它会启动一个叫子shell的进程.作为主shell的子进程,子shell将shell脚本 ...
- Mysql 服务在本机,需要单机调试Mysql数据库 发生 不认识hostname‘localhost’
今天在本机安装Mysql Server然后用Workbench打开,连接本机数据库 hostname:localhost port:3306 弹出:localhost 不能连接 错误-1042 尝试了 ...
- WCF传输图片解决方案
图片无法序列化后传输,但我们可以将图片转二进制字符串传输.然后在服务端将二进制字符串转图片. 将图片转字符串的例子: private byte[] BmpToJpegBuff(Image img) { ...
- 一、Python 简介
There should be one -- and preferably only one -- obvious way to do it. 一种解释型,面向对象的.带有动态语义的高级程序设计语言. ...
- IntelliJ IDEA 14.x 与 Tomcat 集成,创建并运行Java Web项目
转自:http://www.php-note.com/article/detail/854 IntelliJ IDEA 14.x 与 Tomcat 集成,创建并运行Java Web项目 作者:php- ...