การใส่ลูกเล่นให้กับปุ่ม เราสามารถทำได้หลายรูปแบบ สำหรับวันนี้เราจะมาสอนการทำให้ปุ่มของเราเปลี่ยนสีได้และสวยขึ้น ดังนี้ค่ะ โค้ด HTML Button CSS { position: relative; display: inline-block; padding:. 9em 4em; color: #000; text-align: center; text-decoration: none; outline: none; overflow: hidden; transition: all. 5s;}, position: absolute; display: block; content: ''; width: 100%; height: 100%; transition: all. 5s;} top: 0; left: 0; border-top: 2px solid #2a14f7; border-left: 2px solid #2a14f7;} right: 0; bottom: 0; border-right: 2px solid #2a14f7; border-bottom: 2px solid #2a14f7;} background-color: #9bfbc6; transition: all. 7s;}, width: 0; height: 0; opacity: 0; transition: all. 7s;} DEMO Comments
submitBtn { padding: 0 15px 0 0; margin-right: 5px; font-size: 2em; text-align: center; background: transparent url ( images/) no-repeat right -140px;} button. submitBtn span { padding: 13px 0 0 15px; height: 37px; background: transparent url ( images/) no-repeat left top; color: #fff;} button. submitBtn: hover, button. submitBtnHover { /* the redundant class is used to apply the hover state with a script */ background-position: right -210px;} button. submitBtn: hover span, button. submitBtnHover span { background-position: 0 -70px;} รูปพื้นหลัง: คลิกขวา Save Link as … ได้เลย วิธีใช้: 11. Text box ดูดีมีระดับ (ความไฮโซ +8) input { padding:5px 3px; border:solid 1px #ccc; margin:10px 5px; background:#eee;} ผลลัพท์: อาจจะแยกเป็น input ก็ว่าไป รูปแบบจะได้แบบนี้ ถูกใจกด Like ใช่กด Tweet หรือ +1 Plus ได้ตามสบาย สงสัยตรงไหนโหลด Firebug ไปจิ้มดูกันเอาเองคัฟ … CSS Firebug Joomla WordPress ชอบบทความเทคโนโลยี ชอบเรื่องลึกลับ ชอบความน้อยแต่มาก (Minimalist)