0
我卡住了一些奇怪的問題,並希望我能在這裏得到一些幫助。問題與多行文本與鉻中的省略號
我有一個多行文本里面的定位標記,由span和div標記包圍。 我已經添加了插件'dotdotdot'以在此文本中添加省略號。 它在Firefox中正常工作,但在Chrome中完全刪除錨標籤。
這裏是的jsfiddle鏈接我已經創建了一個測試 https://jsfiddle.net/trupti11/0p7jf56m/6/
調整輸出窗口寬度移動的大小(大約360像素或更低),你可以看到文本消失。
可能是什麼問題?
下面是示例代碼
的Html
<div class="wallTopBar" style="width:100%;">
<img class="b2l_border_img" alt="" src="" style="display: block;" width="auto" height="auto">
<div class="wallTitle" style="display: block; overflow-wrap: break-word;"><span class="wallTitleBox"><a href=" http://www.google.com " target="_blank">Testing for really really long long long, very looonnggg booklist name</a></span></div>
<div class="embedButton" style="display: block;">
<span style="display: none;">Embed Code</span>
<img src="" width="35px" height="35px">
</div>
<div class="dummyDesc" style="display: none;"></div></div>
的Javascript
$(document).ready(function() {
$(".wallTitle").dotdotdot({
ellipsis: '... ',
watch: "window",
wrap : 'word',
fallbackToLetter: true
});
});
CSS
.wallTopBar {
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
margin: auto; padding: 0; position: fixed; top: 0; z-index: 10;
}
.b2l_border_img {
height: 4px;margin: auto;width: 100%;background-color:#ccc;
}
.wallTitle { margin-right: 60px; }
.wallTitle {
font-family: opensans-bold,Arial,Helvetica,sans-serif;
font-size: 18px; max-height: 60px; overflow: hidden;
padding-top: 0; position: relative;
}
.wallTitle span {
display: table; height: 46px; margin: 4px auto;
overflow: hidden; width: 98%;
}
.wallTitleBox {
border: 1px solid #cccccc; box-shadow: 3px 1px 5px #cccccc;
}
.wallTitle a {
display: table-cell;padding: 1px;vertical-align: middle;
text-decoration:none;
}
.embedButton {
border-radius: 6px; height: 35px;margin: 12px 8px;
position: absolute;right: 0;top: 4px;
}
.embedButton img { background-color:#ccc; }
感謝您的幫助。
哇,完美的作品。非常感謝:) – pravid
你是歡迎:) –