视觉设计应用

1. text-align: justify;   // 段落两端对齐

2. 使用CSS animation更改按钮的悬停状态

<button>Register</button>

css:

button {
    border-radius: 5px;
    color: white;
    background-color: #0F5897;
    padding: 5px 10px 8px 10px;

  background: linear-gradient(35deg,#ccffff,#ffcccc); // 背景渐变
  animation-iteration-count: infinite; // 动画连续运行
  animation-iteration-count: 3; // 动画运行 3 次
}
button:hover {
    animation-name: background-color;  // name 
    animation-duration: 2000ms;   // 过程持续 2 秒
  animation-fill-mode:forwards; // 鼠标移上去突出效果 } @keyframes background-color{ // name 100%{ background-color: #4791d0; } }
@keyframes rainbow {
    0% {
        background-color: blue;
        top: 0px;
        left:0px;
    }
    50% {
        background-color: green;
        top: 50px;
        left:25px;
    }
    100% {
        background-color: yellow;
        top: 0px;
        left:-25px;
    }
}            

猜你喜欢

转载自www.cnblogs.com/jy13638593346/p/9235194.html