ตั้งค่าการอ่าน

ค่าเริ่มต้น

  • เลื่อนอัตโนมัติ
    แจก บีจี+เฮด โค๊ด และ Tip ต่างๆ

    ลำดับตอนที่ #7 : [Code]ใส่ภาพพื้นหลัง

    • เนื้อหาตอนนี้เปิดให้อ่าน
    • 685
      0
      15 พ.ค. 54

     
    โค๊ดบีจี มากมาย

    โค๊ดบีจีจากภาพเล็กๆหลายภาพเรียงกัน หรือภาพใหญ่(แนะนำ1000*600)

    <style>body{
    background-attachment: fixed;
    background-image:url(ใส่ URLของภาพที่จะใช้);
    }</style>


    โค๊ดให้ภาพอยู่ ตรงกลาง

    <style type="text/css">
    body
    {
    background-image:url('ใส่URLรูปตรงนี้');
    background-color:#โค๊ดสี;
    background-repeat:no-repeat;
    background-attachment:fixed;
    background-position:center;
    }
    </style>


    โค๊ดให้ภาพอยู่ มุมขวาบน

    <style>Body {
    background-image:url("ใส่ URLของภาพที่จะใช้");
    background-position:right top;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: "#ใส่สี Bg ที่ต้องการ";
    }</style>


    โค๊ดให้ภาพอยู่ มุมขวากลาง

    <style>Body
    {background-image:url("ใส่ URLของภาพที่จะใช้");
    background-position:right center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: "#ใส่สี Bg ที่ต้องการ";
    }</style>


    โค๊ดให้ภาพอยู่ มุมขวาล่าง

    <style>Body {
    background-image:url("ใส่ URLของภาพที่จะใช้");
    background-position:right bottom;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: "#ใส่สี Bg ที่ต้องการ";
    }</style>


    โค๊ดให้ภาพอยู่ มุมซ้ายบน

    <style>Body {
    background-image:url("ใส่ URLของภาพที่จะใช้");
    background-position:left top;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: "#ใส่สี Bg ที่ต้องการ";
    }</style>


    โค๊ดให้อยู่ มุมซ้ายกลาง

    <style>Body {
    background-image:url("ใส่ URLของภาพที่จะใช้");
    background-position:left center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: "#ใส่สี Bg ที่ต้องการ";
    }</style>


    โค๊ดให้ภาพอยู่ มุมซ้ายล่าง

    <style>Body {
    background-image:url("ใส่ URLของภาพที่จะใช้");
    background-position:left bottom;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: "#ใส่สี Bg ที่ต้องการ";
    }</style>

    *-วิธีใส่โค๊ด คลิก
     -วิธีหา URL รูปภาพ คลิก
     -วิธีปรับขนาดรูป คลิก


    ติดตามเรื่องนี้
    เก็บเข้าคอลเล็กชัน

    นิยายที่ผู้อ่านนิยมอ่านต่อ ดูทั้งหมด

    loading
    กำลังโหลด...

    อีบุ๊ก ดูทั้งหมด

    loading
    กำลังโหลด...

    ความคิดเห็น

    ×