1. the images need to go to public/images dir.
2. the comments in css file:
/* ...............*/
3. see the example css below, we will explain one by one:
.container { width: 710px; } body { background: #cff; } header { padding-top: 20px; } header img { padding: 1em; background: #fff; } section { margin-top: 1em; font-size: 120%; padding: 20px; background: #fff; } section h1 { font-size: 200%; } /* Links */ a { color: #09c; text-decoration: none; } a:hover { color: #069; text-decoration: underline; } a:visited { color: #069; }
Each rule refers to a class, an id, an html tag, or some combination, followed by a list of styling commands.
body { background: #cff; }
this rule will change the background color of the body tag to baby blue.
(#cff stand for a color.)
note: html color can be coded with 3 hexadicimal numbers, 1st number for red, 2nd number for green, 3rd number for blue.
#fff is pure white.
#000 is pure black.
header img { padding: 1em background: #fff; }
this rule puts a padding layer of 1 em (roughly the width of the letter M) around the img inside a header tag.
it also make the backgroud #fff, which is white.
.container { width: 710px; }
this rule styles an element with class "container", in this case, the width is 710 pixels.(that is 18 blueprint columns).
you must noticed the "." before container.
the dot in ".container" indicates that the rule styles a class called "container"
While, the pound sign "#" indicated a rule to style a CSS id, in the same way a dot indicates a class.
4.
nav { float: right; } nav { background-color: white; padding: 0 0.7em; white-space: nowrap; } nav ul { margin: 0; padding: 0; } nav ul li { list-style-type: none; display: inline-block; padding: 0.2em 0; } nav ul li a { padding: 0 5px; font-weight: bold; } nav ul li a:visited { color: #09c; } nav ul li a:hover { text-decoration: underline; }
here, "nav ul" styles a ul tag inside a nav tag,
"nav ul li" styles an li tag inside a ul tag insdie a nav tag, and so on.
5. next we will make the link of "sign in now" better:
a.signup_button { margin-left: auto; margin-right: auto; display: block; text-align: center; width: 190px; color: #fff; background: #006400; font-size: 150%; font-weight: bold; padding: 20px; }
6. we have used "round" class before, which function is round the corners of buttons, etc.
we will define this css now.
.round { -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px; }
发表评论
-
12.3.3 scaling issue of the status feed
2011-10-30 17:54 814the problem of the implementati ... -
12.3 the status feed
2011-10-30 15:34 8521. we need to get all the micro ... -
12.2 a working follow button with Ajax
2011-10-29 18:10 9091. in the last chapter, in the ... -
12.2 a web interface for following and followers.
2011-10-28 22:14 8761.before we do the UI, we need ... -
12. following user, 12.1 relationship model
2011-10-18 14:29 7471. we need to use a relationshi ... -
11.3 manipulating microposts.
2011-10-17 15:31 8931. since all micropost actions ... -
11.2 show microposts.
2011-10-17 12:01 6981. add test to test the new use ... -
11.1 user micropost -- a micropost model.
2011-10-17 10:43 11031. we will first generate a mic ... -
10.4 destroying users.
2011-10-16 15:47 733in this chapter, we will add de ... -
10.3 showing users list
2011-10-15 20:41 768in this chapter, we will do use ... -
10.2 protect pages.
2011-10-15 15:11 656again, we will start from TD ... -
10.1 updating users.
2011-10-14 18:30 7051. git checkout -b updating-use ... -
9.4 sign out
2011-10-13 15:21 731whew!!!, last chapter is a long ... -
9.3 sign in success.
2011-10-12 15:39 7411. we will first finish the cre ... -
9.1 about flash.now[:error] vs flash[:error]
2011-10-12 15:37 722There’s a subtle difference ... -
9.2 sign in failure
2011-10-12 12:19 655start from TDD!!! 1. requir ... -
9.1 sessions
2011-10-12 10:00 643a session is a semi-permanent c ... -
what test framework should you use?
2011-10-11 16:56 0for integration test, i have no ... -
what test framework should you use?
2011-10-11 16:56 0<p>for integration test, ... -
8.4 rspec integration tests
2011-10-11 16:53 714in integration test, you can te ...
相关推荐
语言:English (United States) 此扩展允许您添加自己的自定义网站特定...AddCSS是一个简洁的扩展程序,使您可以将自己的自定义域特定CSS代码添加到网页中,甚至可以在不同计算机上的Chrome浏览器之间同步自定义代码。
yarn add css-to-rn.macro babel-plugin-macros ``` 接下来,你需要配置Babel以使用这个宏。在你的`.babelrc`或`babel.config.js`文件中添加以下内容: ```json { "plugins": ["macros"] } ``` 现在,你可以在你...
element.classList.add('is-visible'); } }); ``` 这段代码会在元素进入视窗时添加`is-visible`类,然后在CSS中定义这个类来启动动画: ```css .delighter.is-visible { animation-play-state: running; } ``` ...
yarn add css-pro-layout 将css-pro-layout.css导入模块 import 'css-pro-layout/dist/css/css-pro-layout.css' ; CDN 您也可以使用的CDN链接 < link href =" ...
**Webpack中的CSS加载器使用详解** 在Web开发中,Webpack是一个强大的模块打包工具,它能够处理各种类型的资源,包括CSS。CSS加载器是Webpack中的一部分,它们负责转换和处理CSS文件,使其能够在JavaScript环境中...
css-vars:将CSS自定义属性与Sass一起使用安装使用npm: npm install css-vars 与纱线: yarn add css-vars 使用Bower: bower install css-var 手动:获取使用@import语句在项目中包含主mixin文件: @import " [%...
css-generator-plugin 自动生成css文件,高效开发页面更新记录2.1.5bugFix: ellipsis 属性移除了 display: inline-block 生成如何使用安装依赖 npm install css-generator-plugin -D yarn add css-generator-plugin ...
yarn add css-to-rn 该软件包取决于react-native因此请确保已安装它。 用法 import React from 'react' ; import { Text , View } from 'react-native' ; import cssToRn from 'css-to-rn' ; const styles = ...
Add the following four links to the <head> of your page:: <link rel="stylesheet" href="../css/screen.css" type="text/css" media="screen, projection"> <link rel="stylesheet" href="../css/print.css" ...
Ophal 是一个可高度伸缩的 Web 平台,旨在简化维护、学习和扩展... jQuery and CSS whenever you need them (using functions addjs() and addcss()) Built-in sandboxed theme engine 标签:Ophal Web框架
yarn add css-reset 手动安装 首先,让我们克隆此存储库: git clone https://github.com/mlaurel/css-reset.git 然后,转到css-reset目录: cd css-reset 现在,您可以运行以下命令来缩小主重置并将其移动到...
<action method="addCss"><stylesheet>css/styles.css</stylesheet></action> <action method="addItem"><type>skin_css</type><name>css/styles-ie.css</name><params/><if>lt IE 8</if></action> ...
CSS补丁 生成CSS补丁(就像diff一样)。使用理由主题生成制作新主题的最简单方法是复制文件并更改一些内容,或者如果使用预处理器(例如SCSS,Less等),则...安装通过纱线安装: yarn add css-patch通过npm安装: np
function addCSS(cssText) { var style = document.createElement('style'); var head = document.head || document.getElementsByTagName('head')[0]; style.type = 'text/css'; if (style.styleSheet) { // ...
让Visual Studio 2010可以支持HTML5和CSS3,实测安装SP1后再安装没问题,如果不安装SP1,应该也能支持,但是没有...HTML 5 Intellisense Schema,Power CSS3 Intellisense Schema,Add CSS 3 to Visual Studio 2010。
下面的代码展示了一个名为`AddCss`的函数,这个函数能够根据传入的CSS文本内容,在当前页面中动态添加样式规则,同时兼容各种主流浏览器,包括Internet Explorer(从6到9)和Firefox。 ```javascript AddCss = ...
标题中的"pelican-add-css-classes-1.0.4.tar.gz"是一个Python库的压缩包,用于增强Pelican这个静态站点生成器的功能。Pelican是一个流行的开源工具,它使用Markdown或ReStructuredText等标记语言来创建静态网站,...
:gear_selector: 安装npm i css-camera# oryarn add css-camera :person_running: 快速开始// Prerequisite:// Create your scene as you likeconst card = document . querySelector ( "#card" ) ;const ...