Asp.net div中溢出

Asp.net div中溢出,asp.net,css,html,Asp.net,Css,Html,我正在使用asp.net。我正在尝试修复div的高度。我正在将所有数据隐藏在溢出中。以下是我的代码示例: <div id="Content" style="height: 90px !important; overflow: hidden; text-decoration: none; text-overflow: ellipsis; display: block; white-space: nowrap;"> abcd<br /> efg

我正在使用asp.net。我正在尝试修复div的高度。我正在将所有数据隐藏在溢出中。以下是我的代码示例:

    <div id="Content" style="height: 90px !important; overflow: hidden; text-decoration: none;
    text-overflow: ellipsis; display: block; white-space: nowrap;">
    abcd<br />
    efgh<br />
    ijkl<br />
    mnop<br />
    qrst<br />
    uvwx<br />
</div>
但是我不能得到这个输出。我想给出内联css。请帮帮我

这是你想要的吗

HTML

<div id="Content" style="height: 60px !important; overflow: hidden;text-overflow:ellipsis; text-decoration: none;
    display: block; white-space: nowrap;">
    abcd<br />
    efgh<br />
    ijkl<br />
    mnop<br />
    qrst<br />
    uvwx<br />
</div>

abcd
efgh
ijkl
mnop
qrst
uvwx
这就是你想要的吗

HTML

<div id="Content" style="height: 60px !important; overflow: hidden;text-overflow:ellipsis; text-decoration: none;
    display: block; white-space: nowrap;">
    abcd<br />
    efgh<br />
    ijkl<br />
    mnop<br />
    qrst<br />
    uvwx<br />
</div>

abcd
efgh
ijkl
mnop
qrst
uvwx

您只需在div下面添加标签,如下所示:

<div id="Content" style="height: 90px !important; overflow: hidden; text-decoration: none">
    abcd<br />
    efgh<br />
    ijkl<br />
    mnop<br />
    qrst<br />
    uvwx
</div>
<label style="display: none">more..</label>

您只需在div下面添加标签,如下所示:

<div id="Content" style="height: 90px !important; overflow: hidden; text-decoration: none">
    abcd<br />
    efgh<br />
    ijkl<br />
    mnop<br />
    qrst<br />
    uvwx
</div>
<label style="display: none">more..</label>

这可以通过(JQuery API)实现。 请浏览此链接并使之成为可能。

可以通过(JQuery API)实现。
请浏览此链接并使其成为可能。

我认为OP希望文本“更多…”在溢出时显示。先生,我可以隐藏溢出部分,但我希望
更多..
显示在下一行先生,我在过去的几天里学到了没有什么是不可能的。我们只需要将这个单词拆分为Im即可。我想OP希望文本“更多…”在溢出时显示。先生,我可以隐藏溢出部分,但我希望
更多..
显示在下一行。先生,我在过去的日子里学到了没有什么是不可能的。我们只需要把这个词分开,让它成为可能。