响应表更改jquery css的问题
我加入了css以使表格响应,但这使td具有日期选择器,可以单行显示月份的天数响应表更改jquery css的问题,jquery,html,css,Jquery,Html,Css,我加入了css以使表格响应,但这使td具有日期选择器,可以单行显示月份的天数 table { border-collapse: collapse; margin: 0; padding: 0; width: 100%; } table caption { font-size: 1.5em; margin: .5em 0 .75em; } table tr { padding: .35em; } table th,table td {
table {
border-collapse: collapse;
margin: 0;
padding: 0;
width: 100%;
}
table caption {
font-size: 1.5em;
margin: .5em 0 .75em;
}
table tr {
padding: .35em;
}
table th,table td {
padding: 625em;
ext-align: center;
}
table th {
font-size: .85em;
letter-spacing: .1em;
text-transform: uppercase;
}
@media screen and (max-width: 600px) {
table {
border: 0;
}
table caption {
font-ize: 1.3em;
}
table thead {
border: none;
clip: rect(0 0 0 0);
height: 1px;
margin: 1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
table tr {
display: block;
margin-bottom: .625em;
}
table td {
display: block;
font-size: .8em;
text-align: right;
}
table td::before {
content: attr(data-label);
float: left;
font-weight: bold;
text-transform: uppercase;
}
table td:last-child {
border-bottom: 0;
}
}
您需要更具体一点,而不是更改html中的每个
表
元素。把你想让它成为一个类的表格(myresponsivetable)
代码>
然后相应地调整CSS:
table.myresponsivetable {
border-collapse: collapse;
margin: 0;
padding: 0;
width: 100%;
}
table.myresponsivetable caption {
font-size: 1.5em;
margin: .5em 0 .75em;
}
table.myresponsivetable tr {
padding: .35em;
}
table.myresponsivetable th,table.myresponsivetable td {
padding: 625em;
ext-align: center;
}
table.myresponsivetable th {
font-size: .85em;
letter-spacing: .1em;
text-transform: uppercase;
}
@media screen and (max-width: 600px) {
table.myresponsivetable {
border: 0;
}
table.myresponsivetable caption {
font-ize: 1.3em;
}
table.myresponsivetable thead {
... and so on ...
此CSS将不适用于日期选择器TD are display:block。这可能就是问题所在。请创建一个代码片段,因为我们无法从你的CSST复制你插件的html。感谢你的及时回复,这对我真的很有帮助。