css属性设置

css在线编辑工具地址:http://tool.chinaz.com/Tools/CssDesigner.aspx

案例详情: http://dongtianee.sinaapp.com/index.html

position属性

  • static:无特殊定位,对象遵循正常文档流。toprightbottomleft等属性不会被应用,默认值。
  • relative:对象遵循正常文档流,但将依据toprightbottomleft等属性在正常文档流中偏移位置。
  • absolute:对象脱离正常文档流,使用toprightbottomleft等属性进行绝对定位。而其层叠通过z-index属性定义。 
  • fixed:对象脱离正常文档流,使用toprightbottomleft等属性以窗口为参考点进行定位,当出现滚动条时,对象不会随着滚动。(IE6不支持此属性)

 水平居中

  1、margin:0 auto;(0可以换成随意数字)
  2、margin-top:auto;margin-bottom:auto;height:200px;

 垂直居中

    1、vertical-align:middle;
  2、margin-left:auto;margin-right:auto;

 阴影:

  -moz-box-shadow: 0.3em 0.4em 0.3em #898989;
  box-shadow: 0.3em 0.4em 0.3em #B6B6B6;

 行距:

  line-height : 180%;

内容可选性:

  -webkit-user-select: none;

  user-select: none;

 

转载于:https://www.cnblogs.com/sweetyu/p/4957965.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值