1、The CSS2 way to enforce separation between table cells is to use the property border-spacing in conjunction with the proper value for the property border-collapse, but support for that approach is pretty bad, so we've left in cellspacing.
It's still valid HTML (and even valid XHTML), so no worries.
2、As we've seen, CSS keywords are separated by spaces except in one instance.
In the CSS property font, there is exactly one place where a forward slash (/) can be used to separate two specific keywords.
Here's an example:
h2 {font: large/150% sans-serif;} //why? cause 150%也可能表示字体增大
The slash separates the keywords that set the element's font size and line height.
This is the only place the slash is allowed to appear in the font declaration.
All of the other keywords allowed for font are separated by spaces.
3、In versions previous to IE7, Internet Explorer for both platforms has problems with correctly handling multiple class selectors.
In these older versions, although you can select a single class name out of a list, selecting based on multiple names in a list does not work properly. Thus, p.warning would work as expected, but p.warning.help would match any p elements that have a class attribute with the word help because it comes last in the selector.
If you wrote p.help.warning, then older versions of Explorer would match any p elements that have warning in their class value, whether or not help appears in the same value.
4、Pseudo-Classes and Pseudo-Elements
Things get really interesting with pseudo-class selectors and pseudo-element selectors.
These selectors let you assign styles to structures that don't necessarily exist in the document, or to phantom classes that are inferred by the state of certain elements, or even by the state of the document itself.
In other words, the styles are applied to pieces of a document based on something other than the structure of the document, and in a way that cannot be precisely deduced simply by studying the document's markup.
It may sound like I'm applying styles at random, but I'm not. Instead, I'm applying styles based on somewhat ephemeral conditions that can't be predicted in advance.
However, the circumstances under which the styles will appear are, in fact, well-defined.
Think of it this way: during a sporting event, whenever the home team scores, the crowd will cheer.
You don't know exactly when during a game the team will score, but when it does, the crowd will cheer,
just as predicted. The fact that you can't predict the moment of the cause doesn't make the effect any less expected.
//传说中的run-time changing................
Consider the anchor element (a), which, in HTML and XHTML, establishes a link from one document to another.
Anchors are always anchors, of course, but some anchors refer to pages that have already been visited, while others refer to pages that have yet to be visited. You can't tell the difference by simply looking at the HTML markup, because in the markup, all anchors look the same. The only way to tell which links have been visited is by comparing the links in a document to the user's browser history.
So, there are actually two basic types of anchors: visited and unvisited. These types are known as pseudo-classes, and the selectors that use them are called pseudo-class selectors.
Internet Explorer for Windows through IE6 does not permit dynamic pseudo-classes to select any elements other than hyperlinks.
IE7 added support for :hover on any element, but not :focus styles for form elements.
5、相对定位:相对于原来的位置(top,left)
已定位元素:position属性不等于static的元素。
6、The transparency we've been discussing so far is all-or-none: an element either has a transparent background or an opaque background. It is also possible to specify that an element (both its background and its foreground content) is translucent. (See Figure 16-4 for an example.)
You do this with the CSS3 opacity attribute. The value of this attribute is a number between 0 and 1, where 1 means 100% opaque (the default) and 0 means 0% opaque (or 100% transparent).
The opacity attribute is supported by the Firefox browser. Earlier versions of Mozilla support an experimental variant named -moz-opacity. IE provides a work-alike alternative through its IE-specific filter attribute.
To make an element 75 percent opaque, you can use the following CSS styles:
opacity: .75; /* standard CSS3 style for transparency */
-moz-opacity: .75; /* transparency for older Mozillas */
filter: alpha(opacity=75); /* transparency for IE; note no decimal point */
分享到:
相关推荐
在CSS编程中,有几个关键点值得开发者关注,以提高代码的可维护性、可读性和扩展性。首先,我们来探讨一下CSS中的可读性。 可读性在任何编程语言中都是至关重要的,CSS也不例外。虽然CSS的语法相对简单,但它的层叠...
这种效果可以用于网站的轮播图、产品展示或任何需要吸引用户注意力的地方。 首先,我们来看“3d球形旋转”这个核心概念。在CSS3中,3D转换是通过transform属性实现的,它可以将元素在三维空间中进行变换,如旋转...
值得注意的是,虽然CSS3提供了强大的动画功能,但过度使用动画可能会对用户体验造成负面影响,因此在设计时需适度并考虑性能优化。 在提供的压缩包文件`texiao2284_1560681149`中,可能包含了实现该文字波浪动画...
值得注意的是,这个项目可能不支持旧版本的Internet Explorer(如IE6、7、8),因为这些浏览器对CSS3和现代JavaScript特性支持有限。 【关键知识点】 1. **JavaScript基础**:事件处理、DOM操作、变量声明、函数...
在网页设计和开发中,CSS(层叠样式表)起着至关重要的作用,它负责页面的布局和样式表现。然而,由于不同的浏览器对CSS...不过,值得注意的是,解决兼容性问题的同时,也要注重性能优化,避免引入不必要的代码和负担。
值得注意的是,绝对定位的元素并不占据原来在文档流中的空间,因此会影响到其他元素的布局。 绝对定位的一个关键特性是`z-index`属性。由于绝对定位的元素可以叠加在其他元素之上,`z-index`用于决定这些元素的堆叠...
这就是"angular-css-element-queries"项目发挥作用的地方,它提供了一种方法,让开发者能够用更接近于CSS的方式去响应元素的变化。 **项目细节** "angular-css-element-queries"是一个实验性的库,致力于为Angular...
根据读者反馈与作者的补充观点,我们可以总结出以下几个值得注意的知识点及改进意见。 #### 1. Filter 的翻译问题 在《精通CSS》一书中,“filter”一词被赋予了两种不同的含义:一种是作为图像处理效果的“滤镜”...
值得注意的是,word-spacing对中文文本无效,因为中文字符间天然没有空格分隔。 最后是letter-spacing属性,它用于增加或减少字符间的间距。与word-spacing不同,letter-spacing对所有字符都有效,包括中文字符。...
<link rel="stylesheet" href="https://www.slyar.com/css/404.css"> ``` 配置完成后,记得保存Nginx配置文件并重新加载服务,例如: ```bash sudo nginx -s reload ``` 然后,你可以使用curl命令检查一个不存在...
值得注意的是,此版本仅供非商业用途的学习与交流,不得用于盈利项目,所有资源来源于网络,如若侵犯到任何版权问题,作者会及时处理。 在压缩包中,我们可以看到以下关键文件: 1. **安装说明.txt**:这是系统...
值得注意的是,正式版即将在不久后发布,可能带来更多的功能和改进。 该系统基于ASP(Active Server Pages)编程语言进行开发,这是一项微软的技术,用于创建动态交互式网页。"asp源码"标签表明了系统的核心代码是...
然而,值得注意的是,不同浏览器对CSS分页属性的支持可能存在差异。例如,Internet Explorer(IE)通常能较好地支持`page-break-after`,而Firefox可能需要更特殊的处理。在Firefox中,由于浏览器不允许跨表格分页,...
值得注意的是,采集器自带了几条规则,用户可以依据这些规则进行测试,但实际使用时可能需要根据目标网站的结构和布局进行适当的规则调整,以确保数据抓取的准确性和完整性。 采集器的加密措施(密码xj01.net)是...
值得注意的是,当Alpha值未指定时,默认为1,即不透明。另外,如果颜色值超出0到255的范围,浏览器会自动调整到最接近的合法值。 接着,HSL(Hue, Saturation, Lightness)和HSLA(Hue, Saturation, Lightness, ...
- "asp":ASP(Active Server Pages)是ASP.NET的早期版本,尽管此标签在这里可能是指ASP.NET,但值得注意的是两者在技术上有显著差异。 【核心知识点】 1. ASP.NET框架:ASP.NET提供了丰富的控件、事件驱动模型和...
在JavaScript代码中,还有一些值得注意的地方: - 使用了立即执行函数表达式(IIFE)来封装`varsetGradient`函数,确保了变量不会泄露到全局作用域。 - 使用了`try...catch`结构来检测浏览器是否支持`<canvas>`的`...
值得注意的是,这个倒计时源码可能还考虑了时区问题,确保无论用户在哪个地方都能准确显示倒计时。另外,如果目标日期和时间是动态输入的,源码中可能还包含了处理用户输入和验证日期格式的代码。 总的来说,这个...
网站根目录是服务器上用于存放网站所有公开访问文件的地方,包括HTML、CSS、JavaScript、图片等资源。确保这些文件位于正确的位置是使CMS正常运行的关键步骤。 【标签】中的“CMS”代表Content Management System...
它可以用于网站标题、欢迎语、产品描述等地方,增强页面的视觉吸引力。比如,在新闻网站的头条区,使用LetterFX可以使标题动态呈现,增加用户的关注度。在电商网站上,LetterFX可以用于促销信息的展示,吸引顾客的...