Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 我怎样才能防止我的ul列表越界?[重复3-仍然无法找到解决方案]_Html_Css - Fatal编程技术网

Html 我怎样才能防止我的ul列表越界?[重复3-仍然无法找到解决方案]

Html 我怎样才能防止我的ul列表越界?[重复3-仍然无法找到解决方案],html,css,Html,Css,我正在尝试构建一个动态用户界面,将模型属性按类别组合在一起 问题之一是我需要在这个屏幕上放置其他运行时属性。我想做的是,每当我添加一个属性或一个新类别时,它都会在显示列表中水平添加,并显示一个水平滚动条 每次我添加属性时,布局都不符合我的要求,而且变得模糊 然后我对StackOverflow做了一些研究,得到了这个,这正是我想要的 所以,我决定应用它,但没有成功。你知道我做错了什么吗 首先,这是html <fieldset class="GPP21KJDHK" style="">

我正在尝试构建一个动态用户界面,将模型属性按类别组合在一起

问题之一是我需要在这个屏幕上放置其他运行时属性。我想做的是,每当我添加一个属性或一个新类别时,它都会在显示列表中水平添加,并显示一个水平滚动条

每次我添加属性时,布局都不符合我的要求,而且变得模糊

然后我对StackOverflow做了一些研究,得到了这个,这正是我想要的

所以,我决定应用它,但没有成功。你知道我做错了什么吗

首先,这是html

<fieldset class="GPP21KJDHK" style="">
    <legend>Victim</legend>
    <div class="GPP21KJDLK" style="overflow: auto; position: relative; zoom: 1;">
        <div style="position: relative; zoom: 1;">
            <div class="GPP21KJDMK" style="position: relative; overflow: hidden; height: 100%; width: 100%;">
                <div class="horizontal">
                    <ul>
                        <li>
                            <div class="vertical">
                                <ul>
                                    <li>
                                        <img class="GPP21KJDPL" src="https://lh5.googleusercontent.com/-b...151332.jpg" style="height: 100px; width: auto;">
                                    </li>
                                    <li>
                                        <div class="GPP21KJDOL">
                                            <div class="gwt-Label GPP21KJDNL">Given Name</div>
                                            <div class="gwt-Label GPP21KJDAM">XXXX</div>
                                        </div>
                                    </li>
                                    <li>
                                        <div class="GPP21KJDOL">
                                            <div class="gwt-Label GPP21KJDNL">Last Name</div>
                                            <div class="gwt-Label GPP21KJDAM">XXXXX</div>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                        </li>
                        <li>
                            <div class="horizontal">
                                <ul>
                                    <li>
                                        <fieldset class="GPP21KJDLL">
                                            <legend>PersonalVehicle</legend>
                                            <div class="GPP21KJDML">
                                                <div class="GPP21KJDOL">
                                                    <div class="gwt-Label GPP21KJDNL">Personal Vehicle</div>
                                                    <div class="gwt-Label GPP21KJDAM">Palio</div>
                                                </div>
                                                <div class="GPP21KJDOL">
                                                    <div class="gwt-Label GPP21KJDNL">Personal Vehicle Color</div>
                                                    <div class="gwt-Label GPP21KJDAM">White</div>
                                                </div>
                                                <div class="GPP21KJDOL">
                                                    <div class="gwt-Label GPP21KJDNL">I'm adding</div>
                                                    <div class="gwt-Label GPP21KJDAM">lots of stuff</div>
                                                </div>
                                                <div class="GPP21KJDOL">
                                                    <div class="gwt-Label GPP21KJDNL">XXX</div>
                                                    <div class="gwt-Label GPP21KJDAM">yyyy</div>
                                                </div>
                                            </div>
                                        </fieldset>
                                    </li>
                                    <li>
                                        <fieldset class="GPP21KJDLL">
                                            <legend>MedicalData</legend>
                                            <div class="GPP21KJDML">
                                                <div class="GPP21KJDOL">
                                                    <div class="gwt-Label GPP21KJDNL">Known problems</div>
                                                    <div class="gwt-Label GPP21KJDAM">??</div>
                                                </div>
                                                <div class="GPP21KJDOL">
                                                    <div class="gwt-Label GPP21KJDNL">Known problems</div>
                                                    <div class="gwt-Label GPP21KJDAM">??</div>
                                                </div>
                                                <div class="GPP21KJDOL">
                                                    <div class="gwt-Label GPP21KJDNL">Known problems</div>
                                                    <div class="gwt-Label GPP21KJDAM">??</div>
                                                </div>
                                                <div class="GPP21KJDOL">
                                                    <div class="gwt-Label GPP21KJDNL">KK</div>
                                                    <div class="gwt-Label GPP21KJDAM">yyyy</div>
                                                </div>
                                                <div class="GPP21KJDOL">
                                                    <div class="gwt-Label GPP21KJDNL">I'm adding</div>
                                                    <div class="gwt-Label GPP21KJDAM">lots of stuff</div>
                                                </div>
                                                <div class="GPP21KJDOL">
                                                    <div class="gwt-Label GPP21KJDNL">I'm adding</div>
                                                    <div class="gwt-Label GPP21KJDAM">lots of stuff</div>
                                                </div>
                                            </div>
                                        </fieldset>
                                    </li>
                                    <li>
                                        <fieldset class="GPP21KJDLL">
                                            <legend>PhysicalProfile</legend>
                                            <div class="GPP21KJDML">
                                                <div class="GPP21KJDOL">
                                                    <div class="gwt-Label GPP21KJDNL">I'm adding</div>
                                                    <div class="gwt-Label GPP21KJDAM">lots of stuff</div>
                                                </div>
                                                <div class="GPP21KJDOL">
                                                    <div class="gwt-Label GPP21KJDNL">I'm adding</div>
                                                    <div class="gwt-Label GPP21KJDAM">lots of stuff</div>
                                                </div>
                                                <div class="GPP21KJDOL">
                                                    <div class="gwt-Label GPP21KJDNL">I'm adding</div>
                                                    <div class="gwt-Label GPP21KJDAM">lots of stuff</div>
                                                </div>
                                                <div class="GPP21KJDOL">
                                                    <div class="gwt-Label GPP21KJDNL">I'm adding</div>
                                                    <div class="gwt-Label GPP21KJDAM">lots of stuff</div>
                                                </div>
                                                <div class="GPP21KJDOL">
                                                    <div class="gwt-Label GPP21KJDNL">I'm adding</div>
                                                    <div class="gwt-Label GPP21KJDAM">lots of stuff</div>
                                                </div>
                                                <div class="GPP21KJDOL">
                                                    <div class="gwt-Label GPP21KJDNL">Eye Color</div>
                                                    <div class="gwt-Label GPP21KJDAM">marrom</div>
                                                </div>
                                                <div class="GPP21KJDOL">
                                                    <div class="gwt-Label GPP21KJDNL">Age</div>
                                                    <div class="gwt-Label GPP21KJDAM">23</div>
                                                </div>
                                            </div>
                                        </fieldset>
                                    </li>
                                </ul>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</fieldset>

谢谢你的帮助

试试这个:

horizontal {padding:0px; margin:0px; width:100%; height:inherit;}
.horizontal > ul { width: 100%; list-style-type: none; margin: auto; overflow-x: scroll; white-space: nowrap;}
.horizontal > ul > li {float:left; display:block;; text-decoration:none; margin:0px; padding:0px;}

我刚在Chrome上发现一个bug。代码运行良好

.horizontal {padding:0px; margin:0px; width:100%; height:inherit;}
.horizontal > ul { width: 100%; list-style-type: none; margin: auto; overflow-x: scroll; white-space: nowrap;}
.horizontal > ul > li {float:left; display: inline-block;; text-decoration:none; margin:0px; padding:0px;}
horizontal {padding:0px; margin:0px; width:100%; height:inherit;}
.horizontal > ul { width: 100%; list-style-type: none; margin: auto; overflow-x: scroll; white-space: nowrap;}
.horizontal > ul > li {float:left; display:block;; text-decoration:none; margin:0px; padding:0px;}