视频教程笔记>> Mastering CSS - Second Edition by Rich Finelli from packtpub.com

本文探讨了三种样式表类型:内联、嵌入和外部样式表,详细解析了box-sizing属性的两种模式:content-box和border-box,以及它们如何影响元素的布局。此外,还介绍了块级元素的两个关键特性,提供了Google html5shiv包的使用方法以增强浏览器兼容性,并分享了一些前端开发中常用的快捷键和资源,如Visual Studio Code编辑器的多光标操作、AutoPrefixer CSS在线工具、响应式设计书籍推荐等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Three types of style sheets: Inline, Embedded, and External.


 

The box-sizing property can be used to adjust this behavior:

  • content-box gives you the default CSS box-sizing behavior. If you set an element's width to 100 pixels, then the element's content box will be 100 pixels wide, and the width of any border or padding will be added to the final rendered width.
  • border-box tells the browser to account for any border and padding in the values you specify for an element's width and height. If you set an element's width to 100 pixels, that 100 pixels will include any border or padding you added, and the content box will shrink to absorb that extra width. This typically makes it much easier to size elements.

来自 <https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing>


Two key characteristics of block elements:

  1. They expand the full width available.
  2. They force line break, which means they stack on top of each other.

The default font size of most browsers is 16px.


使用Google的html5shiv包(推荐)

1

2

3

<!--[if lt IE9]>

<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>

<![endif]-->

由于国内google的服务器访问卡,建议调用国内的cdn

1

2

3

<!--[if lt IE 9]>

<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>

<![endif]-->

来自 <https://www.jb51.net/article/75430.htm>


http://www.richfinelli.com/troubleshooting-html-and-css/

 

 

------------------------------

You can hold Alt and left click to place cursors arbitrarily.

You can view and edit keyboard shortcuts via:

File → Preferences → Keyboard Shortcuts

Documentation:

https://code.visualstudio.com/docs/customization/keybindings

Official VS Code Keyboard shortcut cheat sheets:

https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf

https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf

https://code.visualstudio.com/shortcuts/keyboard-shortcuts-linux.pdf

来自 <https://stackoverflow.com/questions/30037808/multiline-editing-in-visual-studio-code>


Specificity Weight
PointsType
10000!Important
1000Inline Style
100ID
10Class(or pseudo class)
1Element
0Universal Selector(*)

 


.otf are fonts for the desktop.


 

 

 

 


Visual Studio Code Shortcuts:

! + tab will fill the documnt with a HTML template.

Lorem + number + tab, such as lorem5, will fill a text consists of 5 words.


Books and articles for further learning:

MOBILE FIRST

来自 <https://abookapart.com/products/mobile-first>

Autoprefixer CSS online

来自 <http://autoprefixer.github.io/>

Dan Cederholm CSS3 FOR WEB DESIGNERS

来自 <https://abookapart.com/products/css3-for-web-designers>

Ethan Marcotte RESPONSIVE WEB DESIGN

来自 <https://abookapart.com/products/responsive-web-design>

jQuery for Designers: Beginner's Guide

Natalie MacLees

来自 <https://www.packtpub.com/web-development/jquery-designers-beginners-guide>

https://shoptalkshow.com/ A podcast for web developers.


Tools and Resources:

https://travismaynard.com/writing/getting-started-with-gulp

http://smacss.com/

https://www.packtpub.com/web-development/designing-next-generation-web-projects-css3

https://css-tricks.com/using-svg/

CSS Tools: Reset CSS

来自 <https://meyerweb.com/eric/tools/css/reset/>

Ultimate CSS Gradient Generator

来自 <https://www.colorzilla.com/gradient-editor/>

http://bradfrost.github.io/this-is-responsive/

https://www.theleagueofmoveabletype.com/ for downloading open source fonts.

http://www.googlefonts.cn/ provides free web fonts

https://zurb.com/playground/foundation-icon-fonts-3 downloading icon fronts

https://caniuse.com/ for checking browsers' compatibilities of various elements.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值