当前位置:  编程技术>WEB前端

<font color=red>CSS 实用实例(推荐)

    来源: 互联网  发布时间:2014-09-06

    本文导语:  Background 背景 设置背景颜色 body {background-color: yellow} h1 {background-color: #00ff00} h2 {background-color: transparent} p {background-color: rgb(250,0,255)} This is header 1 This is header 2 This is a paragraph [Ctrl+A 全选 注:如需引入外部Js需...

Background 背景 设置背景颜色
body {background-color: yellow} h1 {background-color: #00ff00} h2 {background-color: transparent} p {background-color: rgb(250,0,255)} This is header 1 This is header 2

This is a paragraph


[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]

设置一张图片做为背景
body { background-image: url('/articleimg/2006/07/3744/bgdesert.jpg') }
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]

垂直重复背景图片
body { background-image: url('/articleimg/2006/07/3744/bgdesert.jpg'); background-repeat: repeat }
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]

水平重复背景图片
body { background-image: url('/articleimg/2006/07/3744/bgdesert.jpg'); background-repeat: repeat-x }
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]

怎样放置背景图片(位置摆放)
body { background-image: url('/articleimg/2006/07/3744/bgdesert.jpg'); background-repeat: no-repeat; background-position: center; }
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]

背景不滚动
body { background-image: url('/articleimg/2006/07/3744/smiley.gif'); background-repeat: no-repeat; background-attachment: fixed }

The image will not scroll with the rest of the page

The image will not scroll with the rest of the page

The image will not scroll with the rest of the page

The image will not scroll with the rest of the page

The image will not scroll with the rest of the page

The image will not scroll with the rest of the page

The image will not scroll with the rest of the page

The image will not scroll with the rest of the page

The image will not scroll with the rest of the page

The image will not scroll with the rest of the page

The image will not scroll with the rest of the page

The image will not scroll with the rest of the page

The image will not scroll with the rest of the page

The image will not scroll with the rest of the page

The image will not scroll with the rest of the page

The image will not scroll with the rest of the page

The image will not scroll with the rest of the page

The image will not scroll with the rest of the page

The image will not scroll with the rest of the page

The image will not scroll with the rest of the page

The image will not scroll with the rest of the page

The image will not scroll with the rest of the page

The image will not scroll with the rest of the page

The image will not scroll with the rest of the page


[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]

背景属性一行解决(用一行文字定义背景属性)
body { background: #00ff00 url('/articleimg/2006/07/3744/smiley.gif') no-repeat fixed center; }

This is some text

This is some text

This is some text

This is some text

This is some text

This is some text

This is some text

This is some text

This is some text

This is some text

This is some text

This is some text

This is some text

This is some text

This is some text

This is some text

This is some text

This is some text

This is some text

This is some text

This is some text

This is some text

This is some text

This is some text


[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]

    
 
 
 
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • java命名空间java.awt.font类textattribute的类成员方法: swap_colors_on定义及介绍
  • resin 与tomcat的区别错误?out.print("<font color=green>可用</font>");
  • java命名空间java.awt.font类textattribute的类成员方法: swap_colors定义及介绍
  • <font color=red>苦思不得其解的问题</font>
  • 留言板问题,如何过滤掉html标签 防止别人引用html的标签呢??如<font color=red>测试</font>
  • i have a string="<html><body><font color='red'>i want display</font></body><html>", can i display it in java?
  • <font color=blue>让2个DIV居中并排显示
  • <font color=green>解读absolute与relative
  • <font color=red>一个导航条布局的简单写法
  • <font color=blue>一个关于正则表达式的问题
  • <font color=red>以前写的两个CSS树形菜单
  • <font color=blue>关于表格的正则表达式讨论(表格)
  • <font color=red>从gb到utf-8
  • <font color=red>VBS中的正则表达式的用法大全 原创
  • <font color=green>CSS实现阴影文字效果
  • <font color=red>SQL语句示例
  • <font color=blue>正则表达式的应用
  • <font color=red>SQL 经典语句
  • <font color=green>UBB 转换函数演示 (经典论坛)
  • java命名空间java.awt类font的类成员方法: font定义及介绍
  • 正则表达式:过滤<font>和</font>
  • java命名空间java.awt类font的类成员方法: truetype_font定义及介绍
  • JavaScript字体工具包 Font.js
  • java命名空间java.awt类font的类成员方法: type1_font定义及介绍
  • <font color=red>又一个典型css实例 iis7站长之家
  • java命名空间java.awt.font类textattribute的类成员方法: font定义及介绍
  • jquery获取font-size属性值的代码
  • java命名空间java.awt类font的类成员方法: derivefont定义及介绍
  • jQuery特效字体插件 Font effect
  • java命名空间java.awt类fontmetrics的类成员方法: font定义及介绍
  • 请教一个font的问题


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,,E-mail:www_#163.com(请将#改为@)

    浙ICP备11055608号-3