Navigation

css

opera网站在创作公用下发布的web标准教育资料

opera网站在创作公用下发布的web标准教育资料

http://www.opera.com/wsc/

Learn to build a better Web with Opera

Learning Web Standards just got easier. Opera’s new Web Standards Curriculum, released in association with the Yahoo! Developer Network, is a complete course to teach you standards-based web development, including HTML, CSS, design principles and background theory, and JavaScript basics. It already has support from many organizations (including Yahoo! and the Web Standards Project) and universities. The first 23 articles are currently available, with about 30 more to be published between now and late September.

These articles are licensed under a Creative Commons Attribution, Non Commercial - Share Alike 2.5 license.

可惜有non-commerical。但总比all rights reserved的要好。

html文件中可以有多个h1?

html文件中可以有多个h1?

我记忆中只能有一个。所以,我的文件,我默认为title是h1,正文的标题我都从h2开始。这样实际我的文章中没有h1标签。

今天查了一下,发现一篇文章中可以有多个h1。而且应该从h1开始。:(
http://www.w3.org/TR/REC-html40/stru...

Every HTML document must have a TITLE element in the HEAD section.

Authors should use the TITLE element to identify the contents of a document. Since users often consult documents out of context, authors should provide context-rich titles. Thus, instead of a title such as “Introduction”, which doesn’t provide much contextual background, authors should supply a title such as “Introduction to Medieval Bee-Keeping” instead.

关于titile。

Some people consider skipping heading levels to be bad practice. They accept H1 H2 H1 while they do not accept H1 H3 H1 since the heading level H2 is skipped.

这里并没说跳过某级heading是错误的,但说有些人觉得这样不好。恰巧我就是有些人中的一元。

这对我很不利!1)我以前的文章不和规范 2)我实际用emacs markdown-mode写作。而且把所有条目都集中在一个文本文件中。我靠h1区别每篇文章。而且在折起文章是,可以直接kill h1,就把整篇文章内容复制到剪贴板了。贴到浏览器中很方便。

所以,我还是准备继续保持从h2开始。或者我去修改模板,把title两边加上h1。但w3c说title不能有修饰的tag!:(

我明白了,我需要修改模板,让title还是不做任何修饰。在body开始的时候,来一个

  <h1>$print title</h1>

看看行不行。

我现在的站点的markup语句是正确的(valid)0

** w3c上一篇关于css的老文章值得重读

** w3c上一篇关于css的老文章值得重读

简洁。例子丰富。

Adding a touch of style

一遍遍读吧。满足我90%的需要了。:)

** 把网站颜色颜色风格改回hacekerish,就是有hacker味道的了

in

** 把网站颜色颜色风格改回hacekerish,就是有hacker味道的了

回到复古70 80年代的hacker风格。也可以称为matrix风格。很简单。

style.css中设置颜色

  body {
  background: black;
  color: green;

最后要有英文分号结尾。这2个颜色应该也是safe color。
如果要更精确点的安全颜色的编码,查看这篇文章: http://www.web-source.net/216_color_...

wikipedia上的web colors有很详细的说明。

搜索safe color

** php中表示YYMMDD的方法参数是 Y-m-d

in

** php中表示YYMMDD的方法参数是 Y-m-d

Ymd
Y-m-d
大小写是有区别的。

** css margin和padding属性顺序是“上右下左”** css margin和padding属性顺序是“上右下左”

in

** css margin和padding属性顺序是“上右下左”

参考了 http://www.blabla.cn/css_tutorials/0...

不过不应该用cm这种单位来
应该用 em 或者 px。
我是坚持用em的,em就是一个英文小写字母m的宽度。
我的字体也都用em设置为相对的。
1.5em作为正文字体。对一般人来说很大。
我喜欢。:)

** 链接外部css的格式是

in

** 链接外部css的格式是

  <link rel="stylesheet" type="text/css" href="test.css" />

** Org-Mode Homepage 站点的css值得我学习

in

** Org-Mode Homepage 站点的css值得我学习

我喜欢这样目录(table of content)是固定不动的。你上下拖动滚动条,只是正文文字跟着翻页。固定不懂得目录/导航,特别方便用户点链接。不会出现看到文章底部还要翻页回去就为了点目录中另外一个链接。

在20080423,该主页的css我需要的那部分是这样的

  http://orgmode.org/org.css

  body {
   margin: 10px 6% 10px 250px;
   font-family: Verdana;
   font-size: 11pt;
   text-align: left;
   background-image: url(img/nrocinu.jpg);
   background-attachment: fixed;
   background-repeat: no-repeat;
   background-position: left top;
  }

  h1 {font-size: 14pt;}

  #table-of-contents {
      font-size: 85%;
      position: fixed;
      display: bloc;
      left: 10px;
      top: 180px;
      width: 200px;
      line-height: 14pt;
  }

  #table-of-contents h2 {
      display:none;
  }

  #table-of-contents ul {
      list-style: none; 
      margin: 7px 0px 7px 15px ; 
      padding: 0px;
  }

  .title {
      padding-bottom: 7px; 
      margin-bottom: 20px; 
      border-bottom: 1px solid #222;
  }

** textarea这个css tag是修饰用户输入框的

in

** textarea这个css tag是修饰用户输入框的

我现在drupal mobi theme用的是

     textarea {
      background-color: black;
       color: green;
       }

我主要是希望让输入框和整体theme用相同颜色。

但输入文章标题和自由tagggin两个form(单独一样的输入框)中背景仍然是白色。我不知道如何调整。求助。

修改css中我最常用的2个参数

in

我不会CSS。一点不会。现在摸版修改主要是修改字号。有的能照猫画虎把这个的一端放到那个摸版里面。

今天总结一下。刚才在修改LYCEUM模版。用得最多的,就是
font-size: 16pt;
line-height: 24pt;

没了。一个设定字号大小,一个设定行距。
这个字号大小每个CSS文件的蛇发布,又用pt的又用em的。
pt就是point吧。点大小,一个点的大小是绝对的一个值
em就是英文字母m的意思。是以小写英文字母m的大小基准,所有字体都是相对m大小的一个概念。

记录一下。

[link] 最好的css layout教材

in

比如输入 黄金 隐私 等词语搜索










搜索本站
搜索WWW

Powered by Drupal, an open source content management system