CSS ::file-selector-button พีซูโอเอลิเมนต์
- หน้าก่อน ::before
- หน้าต่อไป ::first-letter
- กลับไปยังชั้นบน คู่มืออ้างอิงเลือกตัวประกอบ CSS
การกำหนดและการใช้งาน
CSS ::file-selector-button
pseudo-element ใช้เลือกปุ่มประเภท <input type="file">
ตัวอย่าง
ตัวอย่าง 1
ตั้งรูปแบบสำหรับปุ่ม <input type="file">
::file-selector-button { border: 2px solid black; padding: 5px 10px; border-radius: 5px; background-color: lightgreen; }
ตัวอย่าง 2
ตั้งรูปแบบสำหรับปุ่ม <input type="file"> และเพิ่มประสิทธิภาพเมื่อเลื่อนหมุน
::file-selector-button { border: 2px solid black; padding: 5px 10px; border-radius: 5px; background-color: lightgreen; } ::file-selector-button:hover { background-color: salmon; cursor: pointer; }
CSS 语法
::file-selector-button { css declarations; }
รายละเอียดเทคนิค
เวอร์ชั่น: | CSS Pseudo-elements Module Level 4 |
---|
การสนับสนุนโปรแกรมนี้
ตัวเลขในตารางบ่งชี้เวอร์ชั่นบราวเซอร์แรกที่สนับสนุน pseudo-element อย่างเต็มที่。
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
89 | 89 | 82 | 14.1 | 75 |
เพจที่เกี่ยวข้อง
ตัวเรียกนำ:โฉมที่มีชื่อเรียกว่า CSS
- หน้าก่อน ::before
- หน้าต่อไป ::first-letter
- กลับไปยังชั้นบน คู่มืออ้างอิงเลือกตัวประกอบ CSS