You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
453 lines
8.3 KiB
453 lines
8.3 KiB
/**
|
|
* 股票信息区块样式
|
|
* 参考图片的深蓝色背景和布局设计
|
|
*/
|
|
|
|
/* 基础容器样式 */
|
|
.stock-info-block {
|
|
width: 100%;
|
|
max-width: 1200px;
|
|
margin: 20px auto;
|
|
background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
|
|
border-radius: 12px;
|
|
padding: 30px;
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
color: #ffffff;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.stock-info-block::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: -70px;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: url("https://cn.nenghui.com/wp-content/uploads/2025/09/20250930191918_2846_68.jpg");
|
|
pointer-events: none;
|
|
}
|
|
|
|
.stock-info-container {
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
/* 股票头部信息 */
|
|
.stock-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 25px;
|
|
padding-bottom: 15px;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
|
|
}
|
|
|
|
.stock-basic-info {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.stock-label {
|
|
font-size: 14px;
|
|
color: rgba(255, 255, 255, 0.8);
|
|
font-weight: 400;
|
|
}
|
|
|
|
.stock-code {
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
color: #ffffff;
|
|
background: rgba(255, 255, 255, 0.1);
|
|
padding: 4px 12px;
|
|
border-radius: 6px;
|
|
letter-spacing: 1px;
|
|
}
|
|
|
|
.update-time {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
font-size: 13px;
|
|
color: rgba(255, 255, 255, 0.7);
|
|
}
|
|
|
|
.update-label {
|
|
font-weight: 400;
|
|
}
|
|
|
|
.update-timestamp {
|
|
font-weight: 500;
|
|
color: #ffffff;
|
|
}
|
|
|
|
/* 主要数据区域 - 三列布局 */
|
|
.stock-main-data {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr 1fr;
|
|
gap: 40px;
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
/* 股价区域 */
|
|
.stock-price-section {
|
|
text-align: left;
|
|
}
|
|
|
|
.current-price {
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.price-value {
|
|
display: block;
|
|
font-size: 48px;
|
|
font-weight: 700;
|
|
color: #ffffff;
|
|
line-height: 1.1;
|
|
margin-bottom: 8px;
|
|
letter-spacing: -1px;
|
|
}
|
|
|
|
.price-change {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.change-value {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
padding: 4px 8px;
|
|
border-radius: 4px;
|
|
background: rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
.change-percent {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
padding: 4px 8px;
|
|
border-radius: 4px;
|
|
background: rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
/* 涨跌颜色 */
|
|
.price-up .change-value,
|
|
.price-up .change-percent {
|
|
color: #e74c3c;
|
|
background: rgba(231, 76, 60, 0.15);
|
|
}
|
|
|
|
.price-down .change-value,
|
|
.price-down .change-percent {
|
|
color: #27ae60;
|
|
background: rgba(39, 174, 96, 0.15);
|
|
}
|
|
|
|
.price-neutral .change-value,
|
|
.price-neutral .change-percent {
|
|
color: #95a5a6;
|
|
background: rgba(149, 165, 166, 0.15);
|
|
}
|
|
|
|
/* 成交量区域 */
|
|
.stock-volume-section {
|
|
text-align: center;
|
|
}
|
|
|
|
.volume-data {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.volume-value {
|
|
font-size: 48px;
|
|
font-weight: 700;
|
|
color: #ffffff;
|
|
line-height: 1.1;
|
|
letter-spacing: -1px;
|
|
}
|
|
|
|
.volume-label {
|
|
font-size: 14px;
|
|
color: rgba(255, 255, 255, 0.8);
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* 成交额区域 */
|
|
.stock-amount-section {
|
|
text-align: right;
|
|
}
|
|
|
|
.amount-data {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: flex-end;
|
|
gap: 8px;
|
|
}
|
|
|
|
.amount-value {
|
|
font-size: 48px;
|
|
font-weight: 700;
|
|
color: #ffffff;
|
|
line-height: 1.1;
|
|
letter-spacing: -1px;
|
|
}
|
|
|
|
.amount-label {
|
|
font-size: 14px;
|
|
color: rgba(255, 255, 255, 0.8);
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* 详细数据区域 */
|
|
.stock-details {
|
|
margin-top: 20px;
|
|
padding-top: 20px;
|
|
border-top: 1px solid rgba(255, 255, 255, 0.2);
|
|
}
|
|
|
|
.detail-row {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 1fr);
|
|
gap: 20px;
|
|
}
|
|
|
|
.detail-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 8px 12px;
|
|
background: rgba(255, 255, 255, 0.05);
|
|
border-radius: 6px;
|
|
}
|
|
|
|
.detail-label {
|
|
font-size: 13px;
|
|
color: rgba(255, 255, 255, 0.7);
|
|
font-weight: 400;
|
|
}
|
|
|
|
.detail-value {
|
|
font-size: 14px;
|
|
color: #ffffff;
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* 加载状态 */
|
|
.loading-state {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 15px;
|
|
padding: 40px 20px;
|
|
text-align: center;
|
|
}
|
|
|
|
.loading-spinner {
|
|
width: 24px;
|
|
height: 24px;
|
|
border: 3px solid rgba(255, 255, 255, 0.3);
|
|
border-top: 3px solid #ffffff;
|
|
border-radius: 50%;
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
|
|
@keyframes spin {
|
|
0% { transform: rotate(0deg); }
|
|
100% { transform: rotate(360deg); }
|
|
}
|
|
|
|
.loading-text {
|
|
font-size: 16px;
|
|
color: rgba(255, 255, 255, 0.8);
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* 错误状态 */
|
|
.error-state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 15px;
|
|
padding: 40px 20px;
|
|
text-align: center;
|
|
}
|
|
|
|
.error-icon {
|
|
font-size: 32px;
|
|
color: #e74c3c;
|
|
}
|
|
|
|
.error-text {
|
|
font-size: 16px;
|
|
color: rgba(255, 255, 255, 0.8);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.retry-button {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
color: #ffffff;
|
|
padding: 8px 16px;
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.retry-button:hover {
|
|
background: rgba(255, 255, 255, 0.2);
|
|
border-color: rgba(255, 255, 255, 0.5);
|
|
}
|
|
|
|
/* 响应式设计 */
|
|
@media (max-width: 768px) {
|
|
.stock-info-block {
|
|
padding: 20px;
|
|
margin: 10px;
|
|
}
|
|
|
|
.stock-header {
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.stock-main-data {
|
|
grid-template-columns: 1fr;
|
|
gap: 30px;
|
|
text-align: center;
|
|
}
|
|
|
|
.stock-price-section {
|
|
text-align: center;
|
|
}
|
|
|
|
.price-change {
|
|
justify-content: center;
|
|
}
|
|
|
|
.stock-amount-section {
|
|
text-align: center;
|
|
}
|
|
|
|
.amount-data {
|
|
align-items: center;
|
|
}
|
|
|
|
.price-value,
|
|
.volume-value,
|
|
.amount-value {
|
|
font-size: 36px;
|
|
}
|
|
|
|
.detail-row {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
gap: 15px;
|
|
}
|
|
|
|
.detail-item {
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
text-align: center;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.stock-info-block {
|
|
padding: 15px;
|
|
}
|
|
|
|
.price-value,
|
|
.volume-value,
|
|
.amount-value {
|
|
font-size: 28px;
|
|
}
|
|
|
|
.detail-row {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
|
|
/* 主题变体 */
|
|
.stock-info-block.theme-light {
|
|
background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
|
|
color: #333333;
|
|
}
|
|
|
|
.stock-info-block.theme-light::before {
|
|
background: linear-gradient(45deg, rgba(0, 0, 0, 0.02) 0%, transparent 100%);
|
|
}
|
|
|
|
.stock-info-block.theme-light .stock-header {
|
|
border-bottom-color: rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.stock-info-block.theme-light .stock-label,
|
|
.stock-info-block.theme-light .update-time,
|
|
.stock-info-block.theme-light .volume-label,
|
|
.stock-info-block.theme-light .amount-label,
|
|
.stock-info-block.theme-light .detail-label {
|
|
color: rgba(0, 0, 0, 0.6);
|
|
}
|
|
|
|
.stock-info-block.theme-light .stock-code,
|
|
.stock-info-block.theme-light .update-timestamp,
|
|
.stock-info-block.theme-light .price-value,
|
|
.stock-info-block.theme-light .volume-value,
|
|
.stock-info-block.theme-light .amount-value,
|
|
.stock-info-block.theme-light .detail-value {
|
|
color: #333333;
|
|
}
|
|
|
|
.stock-info-block.theme-light .stock-code {
|
|
background: rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.stock-info-block.theme-light .change-value,
|
|
.stock-info-block.theme-light .change-percent {
|
|
background: rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.stock-info-block.theme-light .detail-item {
|
|
background: rgba(0, 0, 0, 0.03);
|
|
}
|
|
|
|
.stock-info-block.theme-light .stock-details {
|
|
border-top-color: rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
/* 动画效果 */
|
|
.stock-info-block {
|
|
animation: fadeInUp 0.6s ease-out;
|
|
}
|
|
|
|
@keyframes fadeInUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(30px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
.price-value,
|
|
.volume-value,
|
|
.amount-value {
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.price-value.updating,
|
|
.volume-value.updating,
|
|
.amount-value.updating {
|
|
transform: scale(1.05);
|
|
} |