123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435 |
- /* ==================
- 布局
- ==================== */
- /* -- flex弹性布局 -- */
- .flex {
- display: flex;
- }
- .basis-xs {
- flex-basis: 20%;
- }
- .basis-sm {
- flex-basis: 40%;
- }
- .basis-df {
- flex-basis: 50%;
- }
- .basis-lg {
- flex-basis: 60%;
- }
- .basis-xl {
- flex-basis: 80%;
- }
- .flex-sub {
- flex: 1;
- }
- .flex-twice {
- flex: 2;
- }
- .flex-treble {
- flex: 3;
- }
- .flex-direction {
- flex-direction: column;
- }
- .flex-wrap {
- flex-wrap: wrap;
- }
- .align-start {
- align-items: flex-start;
- }
- .align-end {
- align-items: flex-end;
- }
- .align-center {
- align-items: center;
- }
- .align-stretch {
- align-items: stretch;
- }
- .self-start {
- align-self: flex-start;
- }
- .self-center {
- align-self: flex-center;
- }
- .self-end {
- align-self: flex-end;
- }
- .self-stretch {
- align-self: stretch;
- }
- .align-stretch {
- align-items: stretch;
- }
- .justify-start {
- justify-content: flex-start;
- }
- .justify-end {
- justify-content: flex-end;
- }
- .justify-center {
- justify-content: center;
- }
- .justify-between {
- justify-content: space-between;
- }
- .justify-around {
- justify-content: space-around;
- }
- /* -- 内外边距 -- */
- .margin-0 {
- margin: 0;
- }
- .margin-xs {
- margin: 10rpx;
- }
- .margin-s {
- margin: 20rpx;
- }
- .margin {
- margin: 30rpx;
- }
- .margin-lg {
- margin: 40rpx;
- }
- .margin-xl {
- margin: 50rpx;
- }
- .margin-top-xs {
- margin-top: 10rpx;
- }
- .margin-top-s {
- margin-top: 20rpx;
- }
- .margin-top {
- margin-top: 30rpx;
- }
- .margin-top-l {
- margin-top: 40rpx;
- }
- .margin-top-xl {
- margin-top: 50rpx;
- }
- .margin-right-xxs {
- margin-right: 6rpx;
- }
- .margin-right-xs {
- margin-right: 10rpx;
- }
- .margin-right-s {
- margin-right: 20rpx;
- }
- .margin-right {
- margin-right: 30rpx;
- }
- .margin-right-l {
- margin-right: 40rpx;
- }
- .margin-right-xl {
- margin-right: 50rpx;
- }
- .margin-bottom-xxs {
- margin-bottom: 6rpx;
- }
- .margin-bottom-xs {
- margin-bottom: 10rpx;
- }
- .margin-bottom-s {
- margin-bottom: 20rpx;
- }
- .margin-bottom {
- margin-bottom: 30rpx;
- }
- .margin-bottom-l {
- margin-bottom: 40rpx;
- }
- .margin-bottom-xl {
- margin-bottom: 50rpx;
- }
- .margin-left-xs {
- margin-left: 10rpx;
- }
- .margin-left-s {
- margin-left: 20rpx;
- }
- .margin-left {
- margin-left: 30rpx;
- }
- .margin-left-l {
- margin-left: 40rpx;
- }
- .margin-left-xl {
- margin-left: 50rpx;
- }
- .padding-0 {
- padding: 0;
- }
- .padding-xs {
- padding: 10rpx;
- }
- .padding-s {
- padding: 20rpx;
- }
- .padding {
- padding: 30rpx;
- }
- .padding-l {
- padding: 40rpx;
- }
- .padding-xl {
- padding: 50rpx;
- }
- .padding-top-xs {
- padding-top: 10rpx;
- }
- .padding-top-s {
- padding-top: 20rpx;
- }
- .padding-top {
- padding-top: 30rpx;
- }
- .padding-top-l {
- padding-top: 40rpx;
- }
- .padding-top-xl {
- padding-top: 50rpx;
- }
- .padding-right-xs {
- padding-right: 10rpx;
- }
- .padding-right-s {
- padding-right: 20rpx;
- }
- .padding-right {
- padding-right: 30rpx;
- }
- .padding-right-l {
- padding-right: 40rpx;
- }
- .padding-right-xl {
- padding-right: 50rpx;
- }
- .padding-bottom-xs {
- padding-bottom: 10rpx;
- }
- .padding-bottom-s {
- padding-bottom: 20rpx;
- }
- .padding-bottom {
- padding-bottom: 30rpx;
- }
- .padding-bottom-l {
- padding-bottom: 40rpx;
- }
- .padding-bottom-xl {
- padding-bottom: 50rpx;
- }
- .padding-left-xs {
- padding-left: 10rpx;
- }
- .padding-left-s {
- padding-left: 20rpx;
- }
- .padding-left {
- padding-left: 30rpx;
- }
- .padding-left-l {
- padding-left: 40rpx;
- }
- .padding-left-xl {
- padding-left: 50rpx;
- }
- /* grid布局 */
- .grid {
- display: flex;
- flex-wrap: wrap;
- }
- .grid.grid-square {
- overflow: hidden;
- }
- .grid.grid-square .cu-tag {
- position: absolute;
- right: 0;
- top: 0;
- border-bottom-left-radius: 6rpx;
- padding: 6rpx 12rpx;
- height: auto;
- background-color: rgba(0, 0, 0, 0.5);
- }
- .grid.grid-square>view>text[class*="cuIcon-"] {
- font-size: 52rpx;
- position: absolute;
- color: var(--grey);
- margin: auto;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- display: flex;
- justify-content: center;
- align-items: center;
- flex-direction: column;
- }
- .grid.grid-square>view {
- margin-right: 20rpx;
- margin-bottom: 20rpx;
- border-radius: 6rpx;
- position: relative;
- overflow: hidden;
- }
- .grid.grid-square>view.bg-img image {
- width: 100%;
- height: 100%;
- position: absolute;
- }
- .grid.col-1.grid-square>view {
- padding-bottom: 100%;
- height: 0;
- margin-right: 0;
- }
- .grid.col-2.grid-square>view {
- padding-bottom: calc((100% - 20rpx)/2);
- height: 0;
- width: calc((100% - 20rpx)/2);
- }
- .grid.col-3.grid-square>view {
- padding-bottom: calc((100% - 40rpx)/3);
- height: 0;
- width: calc((100% - 40rpx)/3);
- }
- .grid.col-4.grid-square>view {
- padding-bottom: calc((100% - 60rpx)/4);
- height: 0;
- width: calc((100% - 60rpx)/4);
- }
- .grid.col-5.grid-square>view {
- padding-bottom: calc((100% - 80rpx)/5);
- height: 0;
- width: calc((100% - 80rpx)/5);
- }
- .grid.col-2.grid-square>view:nth-child(2n),
- .grid.col-3.grid-square>view:nth-child(3n),
- .grid.col-4.grid-square>view:nth-child(4n),
- .grid.col-5.grid-square>view:nth-child(5n){
- margin-right: 0;
- }
- .grid.col-1>view {
- width: 100%;
- }
- .grid.col-2>view {
- width: 50%;
- }
- .grid.col-3>view {
- width: 33.33%;
- }
- .grid.col-4>view {
- width: 25%;
- }
- .grid.col-5>view {
- width: 20%;
- }
-
|