猿问

急急急急急急! 在线等

<div class="select">

<div class="ul-1 dis-in">

<div class="form_group">

<label class="form_label ml15 text-l"><i class="red">*</i>Product Line</label>

</div>

<ul class="bor-top">

<li>Carrier Software</li>

<li class="bg-back"><span class="c-elongation">Common Field</span></li>

<li>Core Network</li>

<li class="bg-back"><span class="c-elongation">Device IC</span></li>

<li>Device Cloud</li>

<li class="bg-back"><span class="c-elongation">Enterprise Business Service</span></li>

<li>Enterprise Vertical Industries Solutions</li>

<li class="bg-back"><span class="c-elongation">Carrier Software</span></li>

<li>Common Field</li>

<li class="bg-back"><span class="c-elongation">Core Network</span></li>

<li>Device IC</li>

<li class="bg-back"><span class="c-elongation">Device Cloud</span></li>

<li>Device IC</li>

<li class="bg-back"><span class="c-elongation">Device Cloud</span></li>

</ul>

</div>

<div class="ul-2 dis-in">

<div class="form_group">

<label class="form_label ml15 text-l"><i class="red">*</i>Product Family</label>

</div>

<ul class="bor-top">

<li>Carrier Software</li>

<li class="bg-back"><span class="c-elongation">Common Field</span></li>

<li>Core Network</li>

<li class="bg-back"><span class="c-elongation">Device IC</span></li>

<li>Device Cloud</li>

<li class="bg-back"><span class="c-elongation">Enterprise Business Service</span></li>

<li>Enterprise Vertical Industries Solutions</li>

<li class="bg-back"><span class="c-elongation">Carrier Software</span></li>

<li>Common Field</li>

<li class="bg-back"><span class="c-elongation">Core Network</span></li>

<li>Device IC</li>

<li class="bg-back"><span class="c-elongation">Device Cloud</span></li>

<li>Device IC</li>

<li class="bg-back"><span class="c-elongation">Device Cloud</span></li>

</ul>

</div>

<div class="ul-3 dis-in">

<div class="form_group">

<label class="form_label ml15 text-l"><i class="red">*</i>ProducttPDT</label>

</div>

<ul class="bor-top">

<li>Carrier Software</li>

<li class="bg-back"><span class="c-elongation">Common Field</span></li>

<li>Core Network</li>

<li class="bg-back"><span class="c-elongation">Device IC</span></li>

<li>Device Cloud</li>

<li class="bg-back"><span class="c-elongation">Enterprise Business Service</span></li>

<li>Enterprise Vertical Industries Solutions</li>

<li class="bg-back"><span class="c-elongation">Carrier Software</span></li>

<li>Common Field</li>

<li class="bg-back"><span class="c-elongation">Core Network</span></li>

<li>Device IC</li>

<li class="bg-back"><span class="c-elongation">Device Cloud</span></li>

<li>Device IC</li>

<li class="bg-back"><span class="c-elongation">Device Cloud</span></li>

</ul>

</div>

<div class="ul-4 dis-in">

<div class="form_group">

<label class="form_label ml15 text-l"><i class="red">*</i>Product</label>

</div>

<ul class="bor-top">

<li>Carrier Software</li>

<li class="bg-back"><span class="c-elongation">Common FieldCommon FieldCommon FieldCommon FieldCommon FieldCommon FieldCommon FieldCommon Field</span></li>

<li>Core Network</li>

<li class="bg-back"><span class="c-elongation">Device IC</span></li>

<li>Device Cloud</li>

<li class="bg-back"><span class="c-elongation">Enterprise Business ServiceEnterprise Business ServiceEnterprise Business ServiceEnterprise Business Service</span></li>

<li>Enterprise Vertical Industries Solutions</li>

<li class="bg-back"><span class="c-elongation">Carrier Software</span></li>

<li>Common Field</li>

<li class="bg-back"><span class="c-elongation">Core Network</span></li>

<li>Device IC</li>

<li class="bg-back"><span class="c-elongation">Device Cloud</span></li>

<li>Device IC</li>

<li class="bg-back"><span class="c-elongation">Device Cloud</span></li>

</ul>

</div>

<div class="windFooter ta-c mt10">

            <span class="btnBlue mr20">ok</span><span class="btnWhite close">Close</span>

        </div>

</div>

css:


.windBlockP{width: 1260px;}

.dis-in{width: 280px;display: inline-block;margin-left: 20px;}

.dis-in .bor-top{border-top: 1px solid #ddd;overflow: scroll;height:397px;}

.form_group .text-l{text-align: left;color: #323232;}

.dis-in li{height: 32px;line-height: 32px;text-indent: 10px;white-space:nowrap;width: auto;color: #888;}

.dis-in li:hover{background-color:#c9ebff; color:#333333;}

.dis-in .bg-back{background-color: #eff9ff;}

.c-elongation{display: inline-block;background-color: #eff9ff;text-indent: 0;}

.dis-in li:hover .c-elongation{background-color:#c9ebff; color:#333333;}


谁会写jquery啊,解决上面的问题。li是用户输入的内容,超出会出现滚动条。获取最大一个宽度的li,在让所有的li和它等宽。



你造吗_
浏览 1554回答 1
1回答

慕郎_莲华

记得选择代码语言~好看些var max = 0; $('li').each(function(){     var w = $(this).width();          if(w > max){         max = w;     } }); $('li').css('width', max)
随时随地看视频慕课网APP
我要回答