惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Jina AI
Jina AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
B
Blog
T
The Blog of Author Tim Ferriss
量子位
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - Franky
小众软件
小众软件
Recent Announcements
Recent Announcements
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
I
InfoQ
美团技术团队
G
Google Developers Blog
Engineering at Meta
Engineering at Meta
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
Visual Studio Blog
云风的 BLOG
云风的 BLOG
博客园 - 【当耐特】
IT之家
IT之家
Microsoft Security Blog
Microsoft Security Blog
博客园 - 聂微东
Last Week in AI
Last Week in AI
H
Hackread – Cybersecurity News, Data Breaches, AI and More
H
Help Net Security

peijie's wiki

怎么抢高铁票 - peijie's wiki 两日游背包收纳 - peijie's wiki 什么是 AI,什么是大语言模型,缺点分析,以及使用技法和技巧总结 - peijie's wiki macOS 里关于“名字”的那些事 - peijie's wiki 将 CapsLock 映射为 Escape,对于macos - peijie's wiki 拔智齿后的食谱 - peijie's wiki 拔智齿后的食谱 - peijie's wiki proxy搭建稳如老狗的原理(老白版) - peijie's wiki 混音原理,Linux混音实操,有线麦克风录音+混录系统BGM+耳返监听 - peijie's wiki Linux 搜索最佳实践【入门版】 - peijie's wiki 线材库存 - peijie's wiki 药品库存 - peijie's wiki pacman - peijie's wiki chinese-input-method-setup - peijie's wiki Programming Concepts and Algorithms/Solutions - peijie's wiki Programming Foundations with HTML - peijie's wiki 如何高效地学习一门编程语言 - peijie's wiki 低卡火锅蘸料 - peijie's wiki 使用键盘组合键启动iTerm - peijie's wiki 中餐厨艺课 - peijie's wiki liupj.top
Programming Foundations with CSS - peijie's wiki
lpj · 2025-03-30 · via peijie's wiki
  1. Web pages are often designed to accommodate [different device/different screen] so that to decide how to display and even what to dispaly.

  2. Users experience webpages differently, some users are color-blind, some can’t see well, some have trouble hearing, some can’t clicking, etc…

So to ensure GoodUserExperience:

web-designers must take [devices & users] into account when creating webpages.

and webpages should load quickly.


CSS: Cascading Style Sheets

[HTML specifies the content | CSS specifies the look & formating] of webpages.

This allows web-designers to separate the content from how it’s presented, which can accommodate different users and different display devices to make sure that even in other countries, these can be displayed without changing the content of the webpage.

And if you’re creating thousands of webpages for a website, changing the color or font or the size of an HTML element can be localized in one place, rather than repeated in a thousand places which would make changes difficult. This is called [Maintainability] in response to changing design requirments & [Reusability] across multiple elements or even multiple webpages.

CSS Basics

1
You could include CSS by either using <style> or <link> tag which are go in the <head> portion of you HTML.

  • Selector
    • tag_name
    • class
    • id
    • combinators: select by relationship(eg: style <li> inside of <ul>: ul li { ... })

Note: You should make name descriptive.(eg: foodLi => can means food-list-items)


https://developer.mozilla.org/en-US/docs/Web/CSS/Reference

Q&A:

  1. whats-the-difference-between-an-id-and-a-class

  2. what-error-will-i-get-if-i-use-the-same-id-for-multiple-html-elements

Colors

https://www.w3.org/TR/2022/REC-css-color-3-20220118/

140 standard color names.

An important concept: Everything is a number for a computer.

Red + Green + Blue, 0-255, => can specify about 16 million colors. => more than humans can distinguish.

eg: Gold == rgb(255, 215, 0)

because of that 0-255 is 256 possible colors, which can be presented by 两个十六进制的数字

FF == 15 * 16 + 15 == 255

D7 == 13 * 16 + 7 == 215

00 == 0 * 16 + 0 == 0

so, Gold == #FFD700

https://developer.mozilla.org/en-US/docs/Web/CSS/Tools/ColorPicker_Tool