Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> CSS
CSS
  1. ค่าของ CSS object-fit Property

    คุณสมบัติ object-fit ใน CSS ใช้ปรับขนาดรูปภาพหรือวิดีโอให้พอดีกับ container ค่าที่มีดังนี้: contain: ขยาย/ย่อเพื่อให้พอดีทั้งหมด cover: ครอบคลุม container ทั้งหมด (อาจถูกตัด) fill: ยืดเต็ม content box (อาจบิดเบี้ยว) ตัวอย่าง: ใช้ cover <!DOCTYPE html> <html>    <head>

  2. บทบาทของ CSS Grid Container

    Grid Container ใน CSS มี grid items วางอยู่ภายในแถวและคอลัมน์ ลองสร้าง CSS Grid container และกำหนดจำนวนคอลัมน์ ตัวอย่าง <!DOCTYPE html> <html>    <head>       <style>          .container {           &

  3. เปลี่ยนสีพื้นหลังปุ่มด้วย CSS

    หากต้องการเปลี่ยนสีพื้นหลังของปุ่ม ให้ใช้คุณสมบัติ background-color ตัวอย่าง <!DOCTYPE html> <html>    <head>       <style>          .btn {             background-color: yellow;     &nb

  4. บทบาทของ CSS flex-wrap: wrap-reverse

    ใช้คุณสมบัติ flex-wrap พร้อมค่า wrap-reverse เพื่อทำให้ flex items wrapping กลับทิศทาง ตัวอย่าง <!DOCTYPE html> <html>    <head>       <style>          .mycontainer {             display: flex; &

  5. เปลี่ยน Padding ของปุ่มด้วย CSS

    หากต้องการเปลี่ยน padding ของปุ่ม ให้ใช้คุณสมบัติ padding ตัวอย่าง <!DOCTYPE html> <html>    <head>       <style>          .button {             background-color: yellow;       &nb

  6. เพิ่มเงาข้อความหลายเงาด้วย CSS

    ใช้ text-shadow พร้อมค่าคั่นด้วยจุลภาค เพื่อเพิ่มเงาหลายเงาในบรรทัดเดียว ตัวอย่าง <!DOCTYPE html> <html>    <head>       <style>          h1 {             text-shadow: 0 0 3px red, 0 0 4px green,

  7. จัดกึ่งกลางรูปภาพด้วย CSS

    หากต้องการจัดกึ่งกลางรูปภาพ ให้ใช้ display: block ร่วมกับ margin-left: auto และ margin-right: auto ตัวอย่าง <!DOCTYPE html> <html>    <head>       <style>          img {             border: 2px s

  8. เพิ่มมุมโค้งให้ปุ่มด้วย CSS

    หากต้องการเพิ่มมุมโค้งให้ปุ่ม ให้ใช้คุณสมบัติ border-radius ตัวอย่าง <!DOCTYPE html> <html>    <head>       <style>          .button {             background-color: yellow;       &

  9. กำหนดจำนวนคอลัมน์ใน CSS Grid Layout

    ใช้คุณสมบัติ grid-template-columns เพื่อกำหนดจำนวนคอลัมน์ใน CSS Grid Layout ตัวอย่าง: Grid 3 คอลัมน์ <!DOCTYPE html> <html>    <head>       <style>          .container {             display: grid

  10. การใช้งาน Transform Property ใน CSS

    คุณสมบัติ transform ใน CSS ใช้สำหรับใช้การแปลง 2D หรือ 3D กับองค์ประกอบ ตัวอย่าง <!DOCTYPE html> <html>    <head>       <style>          div {             width: 200px;        

  11. วิธีใช้ 2D/3D Transformation กับองค์ประกอบ CSS

    ใช้คุณสมบัติ transform ใน CSS เพื่อใช้การแปลง 2D หรือ 3D กับองค์ประกอบ ตัวอย่าง: หมุนองค์ประกอบ <!DOCTYPE html> <html>    <head>       <style>          div {             width: 200px;   &nbs

Total 1584 -คอมพิวเตอร์  FirstPage PreviousPage NextPage LastPage CurrentPage:45/80  20-คอมพิวเตอร์/Page Goto:1 39 40 41 42 43 44 45 46 47 48 49 50 51