列表位置向前移动怎么编写html,位置:固定,向 上移动div(示例代码)

这是我的示例HTML文件。点击我将position:fixed添加到两个div: - claims-side-panel和alert-section。对于claims-side-panel,div也向上移动,但我通过提供额外的财产margin-top:auto来修复它。

对于alert-section我尝试了top:0(它进一步向上移动元素到标题)和margin-top:auto但它不工作

.SOme content...SOme content...SOme content..

SOme content

下面是添加位置之前的CSS文件:固定为claims-side-panel和alerts-section

div.claims-main-wrapper {

.fa-spinner {

@include font-size(40px);

position: absolute;

margin: 60px auto;

left: 50%;

}

aside {

.claims-side-panel {

width: 400px;

}

}

div.alert-section {

width: 400px;

padding-top: 0;

.table thead th {

border-bottom: 1px solid $border-color;

}

.table th,

.table td {

border-top: 0;

}

.table td span.duplicateStatus {

background-color: $contribution-status-color;

padding: 7px 12px 6px 15px;

color: $text-contrast-light;

border-radius: 15px;

text-transform: uppercase;

@include font-size(12px);

text-align: center;

font-family: $tertiaryFontFamily;

padding: 7px 12px 6px 15px;

font-weight: bold;

}

}

}

请在添加position:fixedto alert-section之前找到图像,这是预期的结果eyJ1cmwiOiAiaHR0cHM6Ly9pLnN0YWNrLmltZ3VyLmNvbS9QczV3aC5wbmcifQ==

添加position:fixed eyJ1cmwiOiAiaHR0cHM6Ly9pLnN0YWNrLmltZ3VyLmNvbS9xcnhncy5wbmcifQ==后的图像

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值