via Transitional vs. Strict Markup,很不错的文章,总结了绝大部分重要条目,在我验证的过程中也发现了几乎所有这些问题。不想全转,一般大家不注意的地方如下:
下面三个标签在 strict 中不再存在!center 用 text-align:center;font用样式表;iframe用object;(搜索本站旧贴)
* center
* font
* iframe
* text and images are not allowed immediately inside the body element, and need to be contained in a block level element like p or div
body 里面不能直接跟inline(行内)元素而必须先用 h1-7,div,p等block(块)元素
* input elements must not be direct descendants of a form element
form里面不能直接跟 input。我个人经验是用div,p或者fieldset
* text in blockquote elements must be wrapped in a block level element like p or div
blockquote 内也不能直接跟行内元素,而需要 p ,div等先
其实使用 W3C xhtml 验证 的时候就会出现这些提示。
这是我一直在使用的样式表内容
a.ubblink[href*="http://"] {background-image:url(images/blank.gif);background-position:center right;padding-right:13px;background-repeat:no-repeat;}
a.ubblink[href*="http://"]:hover {background-image:url(images/blank-hover.gif);}
但opera,ie 目前都不支持 属性选择器 的写法,所以只有firefox才能看到效果。今天看到这个 Simple, accessible external links,有点意思。
他是这样做的
样式表是
a.external span
{
position: absolute;
left: -5000px;
width: 4000px;
}
a.external:link
{
background: url(icon.gif) no-repeat 100% 0;
padding: 0 20px 0 0;
}
a.external:hover
{
color: red;
background: url(icon.gif) no-repeat 100% -200px;
padding: 0 20px 0 0;
}
把 a span 中的说明文字丢到浏览器显示区域之外(这个span据说是为了某些不提示title的设备而准备的)。
然后在后面加上图片表示这是一个外部链接。
其实,我觉得的倒是可以参考这种精神,用js解决。(但我懒啊,ie反正我也不用…)
http://www.cssbeauty.com/skillshare/comments.php?DiscussionID=11&page=1
# Turning a list into a navigation bar
# How To Clear Floats Without Structural Markup
# A CSS styled table
# Generating Dynamic CSS with PHP
# A CSS Framework
# Avoiding classitis
# Architecting CSS
# Creating a Star Rater using CSS
# Introducing the CSS3 Multi-Column Module
# In search of the One True Layout
# One clean HTML markup, many layouts
# PHP + CSS Dynamic Text Replacement (P+C DTR)
每次都要查询dns,不会这么郁闷吧,也不知道windows host 文件对firefox起作用不?
network.dnsCacheEntries [Integer]
This setting determines how many entries should be held in the Firefox DNS (Domain Name System) cache. Whenever you enter a web address in Firefox, it needs to convert that text address into an IP number. It does this by looking up the name and IP number through a DNS server. By holding DNS entries in a local cache, the next time you want to go to the same site Firefox can load it up much faster. By default Firefox holds 20 entries in the cache. I recommend changing this number to match the number of sites you regularly browse each day. More importantly, check the setting below to ensure DNS entries are kept up to date.
据说默认是20个缓存条目,而且 about:config 里默认没有这个项目。
network.dnsCacheExpiration [Integer]
This setting determines how long the cached DNS entries (as set by the network.dnsCacheEntries setting) are held before they are discarded. The default is 60 (seconds), however before changing this setting consider the pros and cons - the longer cached entries are held, the quicker your browsing may be, but the longer it may take for Firefox to be aware that a site which was temporarily considered unavailable (unresolved) is now accessible (resolved).
默认60秒过期,很可能就是这个原因,一分钟够干什么呀…
我新建了这两个条目,不知道有用没,用一段时间再看… fasterfox 据说也有这个选项,我懒得装,不知道是不是一回事。谁知道,请留言赐教,谢谢。
看到 Defining CSS constants using PHP,为什么不呢?动态的样式表…易维护而且还能玩些其它效果出来…
#header {
$myStyle
color: #FF0000;
}
…
或者
href="css.php?file=main"media="screen, print" />
…
BTW:这个 搜索|下载 google video 的站点也挺好玩…
等周一吧…