Thuộc tính CSS Animatable

Thích 2.04 K Bình luận 0
877 đánh giá

Thuộc tính CSS Animatable nghĩa là chúng có thể được sử dụng trong phim hoạt hình và hiệu ứng chuyển tiếp.

Thuộc tính Animatable có thể thay đổi dần dần từ giá trị này sang một giá trị khác, như kích thước, số lượng, tỷ lệ và màu sắc…

Trình duyệt hỗ trợ

Các con số trong bảng dưới đây xác định các phiên bản trình duyệt đầu tiên hỗ trợ CSS animations.

Các thông số tiếp theo -webkit-, -moz-, hay -o- xác định phiên bản đầu tiên đã làm việc với một tiền tố.

     
4.0 -webkit-10.016.0
5.0 -moz-
4.0 -webkit-15.0 -webkit-
12.1
12.0 -o-

 

Ví dụ

Tạo sự sinh động màu nền với thuộc tính background-color từ màu đỏ sang vàng:

/* CSS chạy tốt trên Chrome, Safari and Opera */@-webkit-keyframes mymove { from {background-color: red;} to {background-color: yelllow;}}/* Cú pháp chuẩn */@keyframes mymove { from {background-color: red;} to {background-color: yellow;}}

 Chạy thử với trình 

Soạn thảo css online

Các thuộc Animatable trong CSS

Thuộc tính
background
background-color
background-position
background-size
border
border-bottom
border-bottom-color
border-bottom-left-radius
border-bottom-right-radius
border-bottom-width
border-color
border-left
border-left-color
border-left-width
border-right
border-right-color
border-right-width
border-spacing
border-top
border-top-color
border-top-left-radius
border-top-right-radius
border-top-width
bottom
box-shadow
clip
color
column-count
column-gap
column-rule
column-rule-color
column-rule-width
column-width
columns
flex
flex-basis
flex-grow
flex-shrink
font
font-size
font-size-adjust
font-stretch
font-weight
height
left
letter-spacing
line-height
margin
margin-bottom
margin-left
margin-right
margin-top
max-height
max-width
min-height
min-width
opacity
order
outline
outline-color
outline-offset
outline-width
padding
padding-bottom
padding-left
padding-right
padding-top
perspective
perspective-origin
right
text-decoration-color
text-indent
text-shadow
top
transform
transform-origin
vertical-align
visibility
width
word-spacing
z-index

» Trở về xem bài học CSS onlinehướng dẫn học CSS

Tác giá: Hoàng Luyến

https://hoangluyen.com/ 


Bình luận