热门面试题与答案和在线测试
面向面试准备、在线测试、教程与实战练习的学习平台

通过聚焦学习路径、模拟测试和面试实战内容持续提升技能。

WithoutBook 将分主题面试题、在线练习测试、教程和对比指南整合到一个响应式学习空间中。

面试准备

模拟考试

设为首页

收藏此页面

订阅邮箱地址

CSS 面试题与答案

Test your skills through the online practice test: CSS Quiz Online Practice Test

相关差异对比

CSS 2 vs CSS 3

问题 66. How do I eliminate the blue border around linked images?

in your CSS, you can specify the border property for linked images:

a img { border: none ; }
However, note that removing the border that indicates an image is a link makes it harder for users to distinguish quickly and easily which images on a web page are clickable.

这有帮助吗? 添加评论 查看评论
 

问题 67. Why call the subtended angle a "pixel", instead of something else (e.g. "subangle")?

In most cases, a CSS pixel will be equal to a device pixel. But, as you point out, the definition of a CSS pixel will sometimes be different. For example, on a laser printer, one CSS pixel can be equal to 3x3 device pixels to avoid printing illegibly small text and images. I don't recall anyone ever proposing another name for it. Subangle? Personally, I think most people would prefer the pragmatic "px" to the non-intuitive "sa".

这有帮助吗? 添加评论 查看评论
 

问题 68. Why was the decision made to make padding apply outside of the width of a 'box', rather than inside, which would seem to make more sense?

It makes sense in some situations, but not in others. For example, when a child element is set to width: 100%, I don't think it should cover the padding of its parent. The box-sizing property in CSS3 addresses this issue. Ideally, the issue should have been addressed earlier, though.

这有帮助吗? 添加评论 查看评论
 

问题 69. How to use CSS to separate content and design ?


The idea here is that all sites contain two major parts, the content: all your articles, text and photos and the design: rounded corners, colors and effects. Usually those two are made in different parts of a webpage?s lifetime. The design is determined at the beginning and then you start filling it with content and keep the design fixed.

In CSS you just add the nifty <link>-tag I?ve told you about to the head of your HTML document and you have created a link to your design. In the HTML document you put content only, and that link of yours makes sure it looks right. You can also use the exact same link on many of your pages, giving them all of them the same design. You want to add content? Just write a plain HTML document and think about marking things up like ?header? instead of ?big blue header? and use CSS to make all headers look the way you want!

这有帮助吗? 添加评论 查看评论
 

问题 70. Some examples of good and bad coding. What?s wrong with this?


<font size="3">Welcome to my page</font>

Comment: The font-tag is design and design shouldn?t be in the HTML document. All design should be in the CSS-file! Instead do this:

In the HTML:
<h1>Welcome to my page</h1>

In the CSS:
h1 { font-size: 2em; }

One more example:

<b>An error occurred</b>

This looks right doesn?t it? But if you look up what <b> stands for you quickly find bold. But bold is certainly design, so it still doesn?t belong in the HTML document. A better choice is <em> that stands for emphasis or simply ?this piece of text is important?. So instead of saying ?this text looks like this? you are saying ?this text is important? and you let the looks be decided by the CSS. Seems like a minor change, but it illustrates how to select your tags. Use this instead:

In the HTML:
<em>An error occured</em>

In the CSS:
em {
font-weight: bold;
color: Red;
}

One last example:

<table>
<tr><td><a href="">first link</a></td></tr>
<tr><td><a href="">second link</a></td></tr>
...
</table>

这有帮助吗? 添加评论 查看评论
 
5) Some examples of good and bad coding. What?s wrong with this? " />

用户评价最有帮助的内容:

版权所有 © 2026,WithoutBook。