4 个答案:
答案 0 :(得分:1)
此外,您可以使用无序列表模拟整个下拉列表。
答案 1 :(得分:0)
尝试这种方式,
style="word-wrap:break-word;width:100%;"
How to wrap the big line text How to wrap the big line text How to wrap the big line text How to wrap the big line text How to wrap the big line text How to wrap the big line text text How to wrap the big line text How to wrap the big line text
答案 2 :(得分:0)
我们可以使用asp:DataList控件而不是Listbox
将[nameofthedatasource]替换为任何数据源,或者在代码隐藏中以编程方式删除属性和setit
将[path]替换为要绑定的属性名称
答案 3 :(得分:0)
limited text$(document).ready(function(){
var l=$(".main div").text();
var store=new Array();
var i=0;
$(".main div").each(function(){
l=$(this).text().length;
store[i]=$(this).text();
i++;
if(l>200){
var a=$(this).text().slice(0,190);
$(this).text(a);
var d=$(this).addClass("after");
}
});
$(".main div").click(function(){
var id=$(this).attr("id");
$(this).text(store[id-1]);
var d=$(this).removeClass("after");
});
});
.main div { width:500px;word-wrap:break-word; background-color:#9CF; margin:5px; border:2px solid black}
.after:after{content:"...";}
tag as a paragraph container. In plaintext files, there are two common formats. Pre-formatted text will have a newline at the end of every physical line, and two newlines at the end of a paragraph, creating a blank line. An alternative is to only put newlines at the end of each paragraph, and leave word wrapping up to the application that displays or processes the text (if it is even necessary).
click on any paragraph...