index.less 1.65 KB
/**
 * 捡个电驴首页样式
 */

/* 搜索框样式 */
// .nut-input {
//     --nut-input-border-radius: 9999px;
//     --nut-input-padding: 8px 16px 8px 40px;
//     --nut-input-font-size: 14px;
//     --nut-input-background-color: #ffffff;
//     --nut-input-border-color: transparent;
// }

.nut-searchbar__search-input .nut-searchbar__iptleft-search-icon {
    margin-right: 15rpx;
}

.nut-searchbar__search-input .nut-searchbar__input-inner .h5-input {
    padding-top: 10rpx;
    color: gray;
}

/* 网格布局修复 */
.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* 间距修复 */
.gap-3 {
    gap: 12px;
}

.space-x-1 > * + * {
    margin-left: 4px;
}

/* 阴影效果 */
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* 图片样式 */
image {
    display: block;
    width: 100%;
    height: 100%;
}

/* 文本省略 */
.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 多行文本省略 */
.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* 修复flex布局在小程序中的问题 */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-around {
    justify-content: space-around;
}

/* 响应式图片 */
.aspect-fill {
    object-fit: cover;
}

/* 卡片悬停效果 */
.card-hover {
    transition: transform 0.2s ease-in-out;
}

.card-hover:active {
    transform: scale(0.98);
}