html部分---样式属性;
<!--大小-->
width:宽度
height:高度
<!--背景与前景-->
"background-color:#0F0; 背景颜色 background-image:url(../%E6%96%B0%E5%BB%BA%E6%96%87%E4%BB%B6%E5%A4%B9/psb.jpg); 背景图片 background-attachment:fixed; 背景不随字体滚动,是固定的; background-attachment:scroll; 背景随字体滚动;
background-size:300px 300px;背景图片的大小;
background-repeat: no-repeat; 背景图片的平铺;一般为norepeat
背景图片的位置
background-position:center; 居中 background-position:top left 居上居左 background-position:top 200px left 200px;居上200像素 居左200像素
<!--字体-->
style="font-family:微软雅黑; 字体类型 font-size:12px; 字体大小 font-weight: bold; 文字加粗 font-style:italic; 文字倾斜 color:red; 文字颜色 text-decoration:underline; 下划线 text-decoration:overline;上划线 text-decoration:line-through;删除线 text-decoration:none 去掉下划线 text-align:center; text-align:left; text-align:right; 水平居中,水平居左,水平居右 vertical-align:middle; line-height:40px;垂直居中,设置行高,两个一般同时出现 text-indent:20px;首行缩进20px;
超链接的样式:
<style> #d1{ width:100px; height:30px; background-color:red; color:#FFF; text-decoration:none} </style> </head> <body> <a id="d1" href="http://www.baidu.com">百度一下</a> </body>
按钮效果:
<style> #anniu{ width:104px; height:40px; background-color:#0CF; color:#FFF; font-size:16px; text-align:center; vertical-align:middle; line-height:40px;} </style> </head> <body> <div id="anniu">百度一下</div> </body>
边距 间距:margin与padding
<style> /* *{ margin:0px auto; padding:0px}网页都需要写,把每个元素的边距和间距都去掉,auto是把所以网页中的<div>居中。*/ #wai{ width:300px; height:300px; background-color:red} #nei{ float:left; width:200px; height:200px; background-color:blue; margin:10px 20px 30px 40px;/*距wai的边距*/ padding: 10px 20px 30px 40px;/*距li的边距*/} #li{ width:100px; height:100px; background-color:#FF0} </style> </head> <body> <div id="wai"> <div id="nei"> <div id="li"></div> </div> </div> </body>
<!--边界 边框-->
<style> .bb{ border:1px solid red; width:300px; height:300px} .aa{ border-bottom:100px solid #96C; border-left:100px solid #C3F; border-top:100px solid #FC0; border-right:100px solid #00C} </style> </head> <body> <div class="bb"><div class="aa"></div></div> </body>
列表 方块
html部分---样式属性;的更多相关文章
- 原创:新手布局福音!微信小程序使用flex的一些基础样式属性
来源:新手布局福音!微信小程序使用flex的一些基础样式属性 作者:Nazi Flex布局相对于以前我们经常所用到的布局方式要好的很多,在做微信小程序的时候要既能符合微信小程序的文档开发要求,又能 ...
- 一起学HTML基础-CSS样式表常用样式属性
样式属性 背景与前景: background-color:#F90; /*背景颜色,样式表优先级最高*/ background-image:url(路径); /*设置背景图片(默认)*/ backgr ...
- 使用jquery修改css中带有!important的样式属性
当CSS中含有!important的样式属性时,普通的修改方式是会出现失败的.如下: <div class="test">使用jquery修改css中带有!import ...
- HTML_css样式表 样式属性 格式布局
CSS(Cascading Style Sheet,叠层样式表),作用是美化HTML网页. /*注释区域*/此为注释语法 一.样式表 (一)样式表的分类 1.内联样式表 和HTML联合显示,控制精确, ...
- 纯css3样式属性制作各种图形图标
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- ActionBar官方教程(11)自定义ActionBar的样式(含重要的样式属性表及练习示例)
Styling the Action Bar If you want to implement a visual design that represents your app's brand, th ...
- hack:选择符前缀法,样式属性前缀法
选择符前缀法 <style> *html .test{width:100px;} /*only for IE6*/ *+html .test{width:100px;}/*for IE6 ...
- 10 GridView 样式属性
GridView 样式属性: 1,android:numColumns="auto_fit" 显示的列数 如果android:numColumns不设置那么自动每行1列 如下图 2 ...
- js中获取css样式属性值
关于js中style,currentStyle和getComputedStyle几个注意的地方 (1)用js的style只能获取元素的内联样式,内部样式和外部样式使用style是获取不到的.针对css ...
- 【3-24】css样式表分类、选择器、样式属性
一.css样式表分类: (一)内联样式表:代码写在标签内的样式表 控制精确 代码重用性差 优先级最高 格式:<p style="样式属性">内容</p> ...
随机推荐
- 关于Tcp,为什么一定要进行三次握手呢?
主要是防止已经失效的请求报文段突然又传送到了服务端而产生的连接的误判. 考虑如下的情况:客户端发送了一个连接请求报文段到服务端,但是在某些网络节点上长时间滞留了,而后客户端又超时重发了一个连接请求报文 ...
- Cisco IOS Debug Command Reference I through L
debug iapp through debug ip ftp debug iapp : to begin debugging of IAPP operations(in privileged EXE ...
- 推荐一款免安装的在线Visio流程工具ProcessOn
昨天收到一人的邮件,说某个软件叫ProcessOn是web版的visio,出于对技术知识的渴望以及自己的好奇所以对ProcessOn进行了一番体验.结果有点被这个软件给吸引上了,无论是在用户体验上,还 ...
- PHP time() 函数
定义和用法 time() 函数返回当前时间的 Unix 时间戳. 语法 time(void) 参数 描述 void 可选. 说明 返回自从 Unix 纪元(格林威治时间 1970 年 1 月 1 日 ...
- passivedns 安装指南
install passivedns on ubuntu Passive DNS对安全研究非常重要,因为它可以在前期帮助我们构建出目标的基础设施结构,并且可以得到以下三方面的答案:该域名曾经绑定过哪些 ...
- oracle 备份和还原还有创建用户、表空间、授权
--找到存放dbf文件的路径--E:\oracle\product\10.2.0\oradata\orcl--可以通过此语句进行查询select * from v$datafile; --创建表空间c ...
- hdu 2000
ps:刚开始学C++...用C++来试试.. 代码: #include <iostream> using namespace std; int main(){ ],t,i,j; ]> ...
- C++11 不抛异常的new operator
在google cpp style guide里面明确指出:we don't use exceptions C++11的noexcept关键字为这种选择提供了便利. C++11以前,提及malloc和 ...
- UE正则表达式查找和替换(将【,;】)替换为换行
- html5zero 网站模板 影片素材
1. http://www.html5zero.com/ HTML5 Zero 收录来自各个网站的网站模版资源,支持响应式网页设计,部分能直接套用于 WordPress.Bootstrap 外,有 M ...