是否有谷歌Chrome专用的CSS黑客攻击?以前存在的许多曾经适用于Chrome的黑客攻击现在被其他浏览器选中(使用).我需要一个针对谷歌浏览器,但不是其他浏览器,如Mozilla Firefox,Safari或Microsoft Edge.
如何将水平滚动条添加到div内的表格?这有CSS解决方案吗?
我有一个宽度为 300 像素、高度为 20 像素的 div,文本在其中随机更改。我只想在溢出 2 行时显示省略号,否则仅使用 CSS。
http://jsfiddle.net/7BXtr/272/
HTML:
<div id="container">
<div class="box">
<div class="text-body">
<div class="text-inner">This is the text description of the item.
It can flow onto more than 2 lines, too,
if there is room for it, but otherwise
should only show 1 line.
</div>
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS:
#container {
width: 104px;
}
.box {
max-height: 40px;
overflow: hidden;
border: solid 1px red;
position: relative;
}
.box:after {
content: '...';
position: absolute;
left: 84px;
bottom: …Run Code Online (Sandbox Code Playgroud) 在Mozilla Firefox中top: 56px显示正常,但在谷歌浏览器中它无法正确显示.
有没有办法top在谷歌浏览器中设置?