jquery+css 完成进度条功能
今天看到一篇文章是css打造进度条。然后自己做成动态的进度条,同样,使用到css和jauery,请看:
1 首先,需要引入jquery.js文件。
<script src="Content/jquery.js" type="text/javascript"></script>
2 所用到的样式部分:
<style>
.graph {
position: relative;
width: 200px;
border: 1px solid #B1D632;
padding: 2px;
margin-bottom: .5em;
}
.graph .bar {
display: block;
position: relative;
background: #37709B;
text-align: left;
&
相关文档:
1. 定义样式
1.1 按html标签定义
例如:body{background-color:#999999; text-align:center}
1.2 按类定义
例如:.style1{border-style:solid; border-color:#0000FF; border-width:1px}
1.3 按id定义
例如:#style2{border-style:solid; border-color:#FF0000; border-width:1px}
2. CSS的位置和引用
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><title>Cross-Browser Text Glow Demo</title>
<mce:style type="text/css"><!--
* {
font ......
abc.css
CSS code
.class1
{
width:10px;
background-color: red;
}
HTML code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<link rel="stylesheet" type="text/css" href="abc.css" />
<TITLE> New Document </TITLE>
<script&g ......
CSS选择器笔记
参考网址:456 Berea Street
一、基本选择器
序号
选择器
含义
1.
*
通用元素选择器,匹配任何元素
2.
E
标签选择器,匹配所有使用E标签的元素
3.
.info
class选择器,匹配所有class属性中包含info的元素
4.
#footer
id选择器,匹配所有id属性等于footer的元素
实例:
* { margin:0; ......
html部分
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>XHTML ......