码迷,mamicode.com
首页 > Web开发 > 详细

学习CSS过程中收集的

时间:2015-06-09 13:24:13      阅读:147      评论:0      收藏:0      [点我收藏+]

标签:

修复使用sub和sup时的行间距问题
sub,sup{
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}
sup{
    top:-0.5em;
}
sub{
    bottom: -0.25em;
}
.p{
    letter-spacing: 4em;/* 字母间距(字偶距) */
    word-spacing: 0.4em/5px;/* 字间距 */
    text-indent: 1.5em/18px;/* 段落第一行缩进 */
    white-space: pre/nowrap/normal;/* 空格输出格式 */
    text-transform: ;/* 修改文本大小写 */
    font-variant:;/* 使用小型大写字母 */

}
 --------------------------------------------------------
      background-attachment: fixed/scroll;背景随页面滚动
      头部加上 class="clearfix"
 --------------------------------------------------------
      通常情况下,<pre></pre>保证原样输出,因此关闭了自动换行,可通过CSS   pre{white-space:pre-warp;}开启自动换行
-----------------------------------------------------------------------------------------------------

1.为单个元素应用多重背景
.neight-sky{
    background-color: #333;
    background-image: url(),url(),url();
    background-position: 50% 102%,100% -150%,0% -150%;
    background-repeat: no-repeat,no-repeat,no-repeat;
}
简写
.neight-sky{
    background-color: #333;
    background:url() 0 0 no-repeat,url() 0 0 no-repeat;多写几遍就好
}
2.试用渐变背景
.neight-sky{
    background: linear-gradient(left,#333,#777);
    linear-gradient 线性渐变
    radial-gradient 径向渐变
    多色渐变 background(top,#ff0000 0%,#00ff00 50%,#0000ff 100%);
}
-----------------------------------------------------------------------------------------------------
浏览器模式操作
-moz-       Firefox及其他使用Mozilla渲染引擎的浏览器
-webkit-    Chrome,Safari
-o-         Opera
-ms-        IE8及以上
 --------------------------------------------------------
CSS字体嵌入
@font-face{
    font-family: ;
    src:url() format();
    font-style: ;
    font-weight: ;
}

 

学习CSS过程中收集的

标签:

原文地址:http://www.cnblogs.com/wangmengfei/p/4563021.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!