如果你去这里,点击缩略图,然后再点标签,你就会看到我的问题。对于那些文字太长溢出的标签,它没有加入滚动条。我不能设置固定宽度,因为第一部分(标题)从一次提交到另一次提交都是不同的。
以下是应该在需要时添加滚动条的部分的CSS。
以下是应该在需要时添加滚动条的部分的CSS。
#scroll-pane{
left: -3px;
position: relative;
width: 100%;
overflow: auto;
font-family:helvetica;
font-size:11px;
color:#fff;
}
有什么想法吗?我相信这对你们来说是个简单的问题。
PeeHaa:
(function($) {
$('#tag_info1').each(function() {
var container = $(this);
var total_height = container.height();
var content_height = parseInt($('span.tag_title', container).outerHeight(true), 10) + parseInt($('span.tag_submission', container).outerHeight(true), 10);
var p_height = 0;
p_height+=parseInt($('span.tag_submission_text', container).css('padding-top'), 10);
p_height+=parseInt($('span.tag_submission_text', container).css('padding-bottom'), 10);
p_height+=parseInt($('span.tag_submission_text', container).css('margin-top'), 10);
p_height+=parseInt($('span.tag_submission_text', container).css('margin-bottom'), 10);
p_height+=parseInt($('span.tag_submission_text', container).css('borderTopWidth'), 10);
p_height+=parseInt($('span.tag_submission_text', container).css('borderBottomWidth'), 10);
$('span.tag_submission_text', this).height(total_height-content_height-p_height);
});
})(jQuery);
我试图让它跟我的设备一起工作,但是没有成功 :(