css学习笔记(1)加入方法 文本属性 颜色和背景

来源:互联网 发布:处cp什么意思网络用语 编辑:程序博客网 时间:2024/03/29 00:05

郁闷,需要修改设备的页面,也就顺便把这些东西的细节都学习一下吧。

1、加入CSS有三种方法:

(1)

  <style>
   <!--
   div
   {width:200; filter: blur(add=true, direction=135, strength=20)};
   -->
  </style>

(2)

<p style="font-size:96;font-style:bold;color:blue;">hongen</p>

(3)

<link rel=stylesheet href=“style.css”>

2、字体属性

font-family:使用什么字体

font-style:是否斜体。normal italic oblique

font-variant:是否小体大写。normal small-caps

font-weight:字体粗细。normal bold bloder lithter等

font-size:字体大小。absolute-size relative-size length percentage等。

例如:

<p style="font-style:oblique;font-variant:small-caps;font-weigth:bold;font-size:96;font-family:GlitzyCurl;color:blue;">hongen</p>

3、颜色和背景属性

color:颜色。p{color:red}

background-color:背景颜色。p {backgroup-color:blue}

background-image:背景图片。body {background-image:url(.jpg)}。图片路径

background-repeat:背景图片重复方式。body {background-repeat:repeat-y}。repeat-x  repeat-y no-repeat

background-attachment:设置滚动。body {background-attachment:scroll}。scroll fixed

background-position:背景图片初始位置。body {background:url top center}。percentage length top left right

 

原创粉丝点击