gpt4 book ai didi

HTML 不可见组件

转载 作者:太空宇宙 更新时间:2023-11-04 02:18:33 25 4
gpt4 key购买 nike

我是 HTML、JS、CSS 等方面的业余爱好者...我需要为我的一个应用程序制作测试站点。

我的问题是......当我使用一些东西时:input type="text"

它从不显示。我需要它在表格中,只需查看 html 代码即可。

顺便说一句。文本区域工作正常,长时间尝试使用愚蠢的 css 代码,我已经尽我所能。

<!DOCTYPE html>
<html lang="en">
<style>
@import url("http://fonts.googleapis.com/css?family=Open+Sans:400,600,700");
@import url("http://netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.css");


*, *:before, *:after {
margin: 0;
padding: 0;
box-sizing: border-box;
}

html, body {
height: 100%;
}

body {
font: 14px/1 'Open Sans', sans-serif;
color: #555;
background: #eee;
}

h1 {
padding: 50px 0;
font-weight: 400;
text-align: center;
}

p {
margin: 0 0 20px;
line-height: 1.5;
}

main {
padding: 50px;
margin: 0 auto;
background: #fff;
}

section {
display: none;
padding: 20px 0 0;
border-top: 1px solid #ddd;
}

input {
display: none;
}

label {
display: inline-block;
margin: 0 0 -1px;
padding: 15px 25px;
font-weight: 600;
text-align: center;
color: #bbb;
border: 1px solid transparent;
}

label:before {
font-family: fontawesome;
font-weight: normal;
margin-right: 10px;
}



label:hover {
color: #888;
cursor: pointer;
}

input:checked + label {
color: #555;
border: 1px solid #ddd;
border-top: 2px solid orange;
border-bottom: 1px solid #fff;
}


.mainTab{
width: 1920px;
margin: 0 auto;
}

.floatingTabs{
margin: 80px;
}

#tab1:checked ~ #content1,
#tab2:checked ~ #content2,
#tab3:checked ~ #content3,
#tab4:checked ~ #content4 {
display: block;
}


.tg {border-collapse:collapse;border-spacing:0;width: 1920px;}
.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:none;overflow:hidden;word-break:normal;}
.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:none;overflow:hidden;word-break:normal;}
.tg .tg-0ord{text-align:right}
.tg .tg-94f7{background-color:#34ff34;text-align:right;vertical-align:top}
.tg .tg-red{background-color:#ffffff;text-align:left;vertical-align:top}
.tg .tg-lqy6{text-align:right;vertical-align:top}
.tg .tg-yw4l{vertical-align:top}

textarea {
border: none;
width: 100%;
-webkit-box-sizing: border-box; /* <=iOS4, <= Android 2.3 */
-moz-box-sizing: border-box; /* FF1+ */
box-sizing: border-box; /* Chrome, IE8, Opera, Safari 5.1*/


}
text { //just test, no woking.
border: solid;
width: 100%;
height: 100%;
-webkit-box-sizing: border-box; /* <=iOS4, <= Android 2.3 */
-moz-box-sizing: border-box; /* FF1+ */
box-sizing: border-box; /* Chrome, IE8, Opera, Safari 5.1*/
}




</style>





<head>
<meta charset="UTF-8">
<title>Incident detail</title>

</head>
<body>




<div class="mainTab">
<table class="tg">
<tr>
<th width="20%" class="tg-0ord">Some stuff</th>
<th width="20%"> **<input type="text">** </th>
<th width="20%" class="tg-lqy6">Here need checkboxstate </th>
<th width="20%" class="tg-yw4l"> etc </th>
<th width="20%" class="tg-yw4l"> </th>
</tr>
<tr>
<td width="20%" class="tg-lqy6">some of components</td>
<td width="20%" class="tg-yw4l">some of components</td>
<td width="20%" class="tg-lqy6">some of components</td>
<td width="20%" class="tg-yw4l">some of components</td>
<td width="20%" class="tg-yw4l">some of components</td>
</tr>

</table>
</div>




<div class="floatingTabs">
<input id="tab1" type="radio" name="tabs" checked>
<label for="tab1">Notes</label>

<input id="tab2" type="radio" name="tabs">
<label for="tab2">Instructions (Affered CI)</label>

<input id="tab3" type="radio" name="tabs">
<label for="tab3">Patrol</label>


<section id="content1">


</section>



<section id="content2">

</section>



<section id="content3">

</section>


</div>


</body>
</html>

最佳答案

你的 CSS 有这个:

input {
display: none;
}

所以所有的input都会被隐藏。只是删除那个?

关于HTML 不可见组件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38518031/

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