HTML was originally created for research documents. The default browser styles were added to make the text easier to read. For example, headings are bold and get smaller depending on which heading level is used to visually show the hierarchy. Paragraphs and headings also have spaces between the elements to aid in readability. Links are blue and underlined, and lists automatically include bullets or numbers. There are more default HTML styles not shown in this example, and will be discussed throughout the course.
HTML最初是为研究文档创建的。添加了默认的浏览器样式,使文本更容易阅读。例如,标题是粗体的,并且根据使用的标题级别来显示层次结构而变得更小。段落和标题之间也有空格,以帮助可读性。链接是蓝色和下划线的,列表自动包括子弹或数字。本例中没有显示更多的默认HTML样式,并将在整个过程中讨论。
Browsers also have their own user agent style sheet, which is the default CSS file. You can actually view these styles using your browser's developer tools. Each modern browser comes with developer tools to allow you to inspect and debug any webpage's HTML in CSS. I'm using Chrome, but with each modern browser you should be able to open the dev tools by right-clicking or two-finger tap if you're on a Mac trackpad and select Inspect.
浏览器也有自己的用户代理样式表,这是默认的CSS文件。实际上,您可以使用浏览器的开发工具来查看这些样式。每个现代浏览器都有开发工具,允许您在CSS中检查和调试任何网页的HTML。我使用的是Chrome浏览器,但在每一个现代浏览器中,如果你在Mac触控板上,你应该可以通过右键点击或双击打开开发工具,并选择检查。
The HTML shows on the left, and the CSS shows on the right. Here it says user agent stylesheet, so these are actually the default styles of this browser. I'm just using a basic sample page I created with only HTML elements and no additional CSS. But you can use these developer tools on any webpage. To take a closer look, you can select any HTML elements on the left panel. For example, if I select the h1, the styles on the right shows under user agent stylesheet because this is the default style, and it also shows exactly which styles are being applied to that element.
左边是HTML显示,右边是CSS显示。这里是用户代理样式表,所以这些实际上是这个浏览器的默认样式。我只是使用了一个基本的示例页面,我只创建了HTML元素,没有附加的CSS。但是你可以在任何网页上使用这些开发工具。要仔细查看,可以在左侧面板中选择任何HTML元素。例如,如果我选择h1,右边的样式会在user agent样式表下显示,因为这是默认样式,并且它也显示了正在应用于该元素的样式。
Developer tools are great for improving your workflow when you're making lots of CSS changes or fixing bugs. In this course, we're focusing on getting started with writing CSS, so there's no need to worry about getting to know how to use this tool just yet. If you'd like to learn more about developer tools, here are some resources for the different browsers. Even though HTML already contains some styles, remember use HTML to assign meaning to the content, not for how it looks.
当您正在进行大量CSS更改或修复bug时,开发人员工具非常适合改进您的工作流程。在本课程中,我们将重点关注如何开始编写CSS,因此无需担心如何使用这个工具。如果您想了解更多关于开发工具的知识,这里有一些针对不同浏览器的资源。尽管HTML已经包含了一些样式,但请记住,使用HTML是为了给内容分配意义,而不是为它的外观。
Instead, we'll use CSS to remove, revise, and add styles, and take your website those default text styles.
相反,我们将使用CSS来删除、修改和添加样式,并使用您的网站默认的文本样式。
CSS1.1.2
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- PLEASE READ THE FOLLOWING APPLE DEVELOPER PROGRAM LICENSE...
- This project was bootstrapped with Create React App. Belo...