zoukankan      html  css  js  c++  java
  • 【HTML打卡】0119css 文字、图片、控制器、引入方式、初始化

    在外面浪了几天哈哈,然后今天继续学习咯。 顺便分享一只吃草少女。

                           


    一、文字

    1、分别设置

    斜正:font-style

    粗细:font-weight

    大小:font-size

    行距:line-height

    字体:font-family


    2、统一设置

    font:italic bold 20px/40px "SimHei"


    3、设置技巧

    有衬线:sans-serif

    无.衬线:serif

    设置字体,客户及其未必有。

    font-family:"微软雅黑","黑体",sans-serif;


    二、图片

    1、分别设置

    background-color:

    background-image:url();

    background-repeat:repeat-x|y  no-repeat;

    background-attachment:fixed;


    2、统一设置

    background:gray url(small.jpg) no-repeat -150px -325px;


    3、位置

    background-position:center| center top| right center;

    background-position:-150px -325px;


    三、控制器

    id 控制器             #test

    class 控制器       .test

    标签控制器          div

    派生控制器          div p


    四、引入

    head中写入<style>.......</style>

    html标签写<div style=“color:red;”></div>

    外部引入css文件,写link tab后写地址 ./css1.css

    import导入css文件,@import url(css2.css);


    无、初始化

    防止各浏览器显示不一致的情况。

  • 相关阅读:
    smarty对网页性能的影响
    php-fpm正在生成页面时,浏览器刷新后,php-fpm会退出吗?
    为什么日志记录到别的目录了?
    一个空格引发的bug
    linux内核--页高速缓存
    radix树
    linux内核--用户态内存管理
    linux内核--内核内存管理
    linux内核--软中断与tasklet
    linux内核--几个上下文(context)
  • 原文地址:https://www.cnblogs.com/iriswang/p/11084663.html
Copyright © 2011-2022 走看看