HTML隐形组件

时间:2016-07-22 04:13:26

标签: html css

我是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>
&#13;
&#13;
&#13;

2 个答案:

答案 0 :(得分:2)

你的CSS有这个:

input {
    display: none;
}

因此所有input都将被隐藏。只是删除那个?

答案 1 :(得分:0)

你的css有,

input {
    display: none;
}

隐藏整个输入属性,如果你删除它将起作用的样式属性,或者只是将其更改为,

input {
    display: block;
}

上面的代码会将您的输入显示为块,或者替换为

input {
    display: inline;
}

此代码将您的数据显示为内联元素。