css 笔记

43 阅读2分钟

last-child

border-left: 1px solid #ddd;
  border-bottom: 1px solid #ddd;

  &:last-child {
    border-right: 1px solid #ddd;
  }
  
  
  tables{
  .btn{
    width: 80px;
    height: 30px;
    border-width: 1px 0px 0px 1px;
    border-color: #dee6f0;
    box-shadow: #d5dde7 0 0 -3px 3px;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    text-align: center;
    border-radius: 6px 6px 0 0;
    line-height: 30px;
    cursor: pointer;
    &:last-child {
      border-right: 1px solid #dee6f0;
    }
    &.active {
      color: #2a50ec;
      text-shadow: 0 0 0.25px currentcolor;
      background: #fff;
    }
  }
}

设置最后一个元素的属性

image.png

transform属性是用来对元素进行旋转、缩放、移动、扭曲等变换效果的。

.page-item{
    position: relative;
    width: 230px;
    height: 300px;
    margin: 20px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    background-color: #fff;
    border: 1px solid #188fff;
    border-radius: 8px;
    box-shadow: 0 10px 10px rgba(24, 143, 255, 0.2);
    color: #188fff;
    cursor: pointer;
}
.page-item:hover{
    background-color: rgb(24, 143, 255);
    color: #fff;
}

------------------------------------
.j-slider .j-slider-handle {
    position: absolute;
    width: 15px;
    height: 15px;
    outline: none;
    border: 2px solid #91caff;
    border-radius: 50%;
    background-color: #fff;
    transform: translate(-50%, -50%);
    margin-top: 2px;
    transition: border 0.2s;
    cursor: pointer;
}

.j-slider .j-slider-handle:hover,
.j-slider.active .j-slider-handle {
    width: 18px;
    height: 18px;
    border: 3px solid #1890ff;
}
---------------------------

.content{
    width: 100%;
    height: 100%;
    padding: 20px 20px 40px;
    background-color: #f5f5f5;
}
.page-item{
    position: relative;
    width: 230px;
    height: 300px;
    margin: 20px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    background-color: #fff;
    border: 1px solid #188fff;
    border-radius: 8px;
    box-shadow: 0 10px 10px rgba(24, 143, 255, 0.2);
    color: #188fff;
    cursor: pointer;
}
.page-item:hover{
    background-color: rgb(24, 143, 255);
    color: #fff;
}
.page-item-icon{
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    margin: auto;
}
.page-item-label{
    position: absolute;
    top: 200px;
    left: 0;
    right: 0;
    font-size: 18px;
    font-weight: bold;
    margin: auto;
}

.page-item-icon.icon-book{
    background-image: url(../images/book-0.png);
}

.page-item-icon.icon-record{
    background-image: url(../images/record-0.png);
}

.page-item-icon.icon-airplain{
    background-image: url(../images/airplain-0.png);
}
.page-item-icon.icon-group{
    background-image: url(../images/group-0.png);
}
.page-item:hover .icon-book{
    background-image: url(../images/book-1.png);
}
.page-item:hover .icon-record{
    background-image: url(../images/record-1.png);
}
.page-item:hover .icon-airplain{
    background-image: url(../images/airplain-1.png);
}
.page-item:hover .icon-group{
    background-image: url(../images/group-1.png);
}

image.png