CSS中常用的属性,汇总,练习出一套试卷,简单版

CSS常用属性的介绍?

颜色属性

可以通过取色器来取色值

例子:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>    
    <style type="text/css">
        *{background: black;}
        p{color:#FF0000}
        
    </style>
    </head>
    <body>
        <p>上课要好好学习,才能找到好工作</p>
    </body>
</html>

字体属性

 
  1. <style type="text/css">

  2. *{background: black;}

  3. p{color:#FF0000;

  4. font-size: 21px;

  5. font-family:楷体;

  6. font-weight: bold; /*字体加粗*/

  7. }

  8. </style>

  9. 背景属性

  10.  
  11. <style type="text/css">

  12. body{background-image: url(timg.jpg);

  13. background-repeat: repeat-x;

  14. background-position: center;}

  15. }

  16. 文本属性
  17.  

  18. p{color:#FF0000;

  19. font-size: 21px;

  20. font-family:楷体;

  21. font-weight: bold;

  22. line-height:300%;

  23. text-indent: 80px;

  24. letter-spacing: 10px;

  25. }


  26. 边框属性

  27.  
  28. .d1{

  29. width: 500px;

  30. height: 400px;

  31. background: beige;

  32. border-style: dashed;

  33. border-color:red;

  34. border

  35. }

  36.  
  37. <div class="d1">

  38. </div>

  39. 输出:

  40.  

  41.  

    虚线边框

    下面在来练习一个试题?

  42.  

     

     


        .input{
                border: 0;
                border-bottom:#000 solid 1px;
                width: 200px;
            }
        题目一:html 叫做 <input type="text" class="input" /><br />
            题目二:css 叫做 <input type="text" class="input" /><br />
            题目二:java 叫做 <input type="text" class="input"  /><br />
            题目二:python 叫做 <input type="text" class="input"  /><br />
            题目二:js 叫做 <input type="text" class="input"  /><br />
    输出:


    版权声明:本文为博主原创文章,转载请附上博文链接!

     

     

     

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值