gpt4 book ai didi

HTML 全 Angular 表格

转载 作者:行者123 更新时间:2023-11-28 04:22:08 26 4
gpt4 key购买 nike

我想要一个全宽的表格。当我给 position:fixed; 它变成全宽但可滚动不起作用。

简而言之,我需要一个与浏览器主体没有任何边距的表格。

body {
font-family: "Helvetica Neue", Helvetica, Arial;
font-size: 14px;
line-height: 20px;
font-weight: 400;
color: #3b3b3b;
-webkit-font-smoothing: antialiased;
font-smoothing: antialiased;
zoom: 4.0;
}

.row {
display: table-row;
background: #f6f6f6;
}

.row:nth-of-type(odd) {
background: #e9e9e9;
}

.wrapper {
margin: 0 auto;
padding: 40px;
max-width: 800px;
}

.table {
margin: 0 0 40px 0;
width: 100%;
display: table;
padding: 0;
margin: 0;
top: 0;
left: 0;
overflow: scroll;
}

@media screen and (max-width: 580px) {
.table {
display: block;
}
}

.row {
display: table-row;
background: #f6f6f6;
}

.row:nth-of-type(odd) {
background: #e9e9e9;
}

.row.header {
font-weight: 900;
color: #ffffff;
background: #ea6153;
}

.row.green {
background: #27ae60;
}

.row.blue {
background: #2980b9;
}

@media screen and (max-width: 580px) {
.row {
padding: 8px 0;
display: block;
}
}

.cell {
padding: 6px 12px;
display: table-cell;
}

@media screen and (max-width: 580px) {
.cell {
padding: 2px 12px;
display: block;
}
}

.cell:before {
padding-left: 10px;
font-family: 'FontAwesome';
margin: 0 5px 0 -15px;
content: '\f023';
}
<div class="table">
<div class="row">
<div class="cell">
Tips and Fair Review
</div>
</div>
</div>

最佳答案

margin: 0 添加到您的 body 样式。

body {
font-family: "Helvetica Neue", Helvetica, Arial;
font-size: 14px;
line-height: 20px;
font-weight: 400;
color: #3b3b3b;
-webkit-font-smoothing: antialiased;
font-smoothing: antialiased;
zoom: 4.0;
margin: 0;
}
.row {
display: table-row;
background: #f6f6f6;
}
.row:nth-of-type(odd) {
background: #e9e9e9;
}
.wrapper {
margin: 0 auto;
padding: 40px;
max-width: 800px;
}
.table {
margin: 0 0 40px 0;
width: 100%;
display: table;
padding: 0;
margin: 0;
top: 0;
left: 0;
overflow: scroll;
}
@media screen and (max-width: 580px) {
.table {
display: block;
}
}
.row {
display: table-row;
background: #f6f6f6;
}
.row:nth-of-type(odd) {
background: #e9e9e9;
}
.row.header {
font-weight: 900;
color: #ffffff;
background: #ea6153;
}
.row.green {
background: #27ae60;
}
.row.blue {
background: #2980b9;
}
@media screen and (max-width: 580px) {
.row {
padding: 8px 0;
display: block;
}
}
.cell {
padding: 6px 12px;
display: table-cell;
}
@media screen and (max-width: 580px) {
.cell {
padding: 2px 12px;
display: block;
}
}
.cell:before {
padding-left: 10px;
font-family: 'FontAwesome';
margin: 0 5px 0 -15px;
content: '\f023';
}
<div class="table">

<div class="row">
<div class="cell">
Tips and Fair Review
</div>
</div>


</div>

关于HTML 全 Angular 表格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42158803/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com