gree_leran/unpackage/dist/dev/mp-weixin/components/newsCard.wxss

91 lines
2.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.row {
font-size: 16rpx;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.news-box {
display: flex;
width: 95%;
margin: 0 auto;
border-radius: 25rpx;
background-color: #fff;
flex-direction: column;
padding: 10rpx;
/* 添加内边距以获得更好的间距 */
box-sizing: border-box;
/* 确保padding和border包含在元素的总宽度和高度内 */
overflow: hidden;
/* 确保内容不会溢出 */
}
.news-box .hand {
display: flex;
align-items: flex-start;
margin-top: 20rpx;
gap: 20rpx;
width: 100%;
/* 确保 hand 占满 news-box 的宽度 */
}
.news-box .hand .info {
display: flex;
flex-direction: column;
flex-grow: 1;
/* 确保 info 占据剩余空间 */
align-items: flex-start;
/* 垂直居中文本 */
flex-wrap: wrap;
/* 确保文本在较小屏幕上自动换行 */
word-wrap: break-word;
/* 强制长单词或URL换行 */
}
.news-box .hand .info .detail {
margin-top: 10rpx;
/* 为 detail 添加顶部间距 */
font-size: 14px;
}
.news-box .hand .info .detail-text {
word-break: break-all;
font-size: 18rpx;
/* 确保长单词正确换行 */
}
.news-box .covera {
width: 150rpx;
height: auto;
/* 保持宽高比 */
flex-shrink: 0;
/* 确保图片不会因为盒子变小而缩小 */
}
.news-box .footer {
width: 100%;
padding: 10rpx;
/* 页脚的内边距 */
text-align: center;
/* 页脚内容居中 */
border-top: 1px solid #eee;
/* 页脚顶部的分隔线 */
}