问题标签 [css-hack]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
2054 浏览

css - 一页中有两个 CSS 绝对定位项

我的设计需要在页面顶部放置一个绝对定位的对象。(圆圈内的菜单)

然后大约 5 行后(使用基础)我有第二个绝对定位元素。但是它的位置是基于前一个元素的,因为一旦你应用position: absolute到一个元素,你通常会发现自己将它应用到其他所有元素。因此,即使默认情况下行相对定位,它也不会重置绝对位置,因此元素浮动到页面的开头。

我可以定位它,但如果我添加一个元素,我必须修改 CSS,所以这不好。

那么你如何重置绝对位置,我试图在我的第二个元素静态和另一个绝对之前有元素,但它不起作用。

第一个元素基于此 Gist,然后代码为:

这就是 HTML

这是 Or 部分,无论此处的内容如何,​​都需要居中它是常规的,但不是在所有页面上

谢谢

0 投票
1 回答
1585 浏览

html - radio button (checkbox hack)

I'm trying to use the CSS radio button hack to reveal a hidden div, but I cannot get it to appear when clicked. With the current code below it is hidden, and nothing happens when I click the check box. I intend to add similar boxes (and later hide them) to display a few tabs of light content. Can someone please offer some aid?

Here is the html (only the first box is written):

Here is the CSS:

0 投票
1 回答
702 浏览

css - IE10 CSS hack 动画属性?

是否可以为 CSSanimation属性创建 IE10 hack?

我正在使用这个:

但是,这不适用于animation. 以下将停止所有浏览器的动画效果:

我想在我现有的样式表中执行此操作,而不使用 JavaScript 或条件样式表。

0 投票
1 回答
42 浏览

php - 在 CMS 应用程序中避免 CSS 覆盖的方法?

我正在尝试为特定事件管理器工具上的事件编辑 CSS 类。特别是我想编辑按钮的背景并使其成为图像。问题是,当我放置背景时: url('path/to/image'); cvent 在图像的 URL 之前插入一个相对路径。你们都知道我可以欺骗 Cvent 编译器不将此字符串识别为图像的任何方法吗?

0 投票
0 回答
56 浏览

internet-explorer - IE9 html[lang] hack 和 LESS

我有一个带有规则集的 LESS mixin 来制作 IE9-hack 选择器:

破解来源:http ://browserhacks.com/#hack-e6b158b7e27bcb157326348efb5c0bb2

但编译后我看到:

如何在 LESS 中解决这个问题?

0 投票
2 回答
1650 浏览

html - 如何使用 CSS3 模糊图像而不裁剪或褪色边缘?

如何使用 CSS3 正确模糊图像而不会使边缘褪色或裁剪图像?

演示

绿色BG通过的问题:

模糊原始

HTML:

CSS:

0 投票
1 回答
114 浏览

css - Can Someone Confirm That I am Doing This Browser Specific CSS Right

I have in my css this class:

This works in I.E. but not in FF or Chrome so I wrote this out and just wanted to do a sanity check here because I am not sure how to write this out and might need direction.

To leave it working in I.E. I left the above line:

So for Firefox and Chrome do I add the following lines like this:

For Firefox:

For Chrome:

Thanks for any help or advice on this.

0 投票
3 回答
519 浏览

css - 减少 IE8 的 hack 背景图像

我想用 Less 为 IE8 设置不同的背景图片,因为它不支持background-size.

我在 Google 中搜索了有关 IE8 hacks 的结果,结果是编写这样的代码height: 300px\9;,以 . 结尾\9

我试过这个,但我发现它不支持background-image设置。

如果我这样写

,Less 编译器会报错,如果我height: 300px\9;这样设置,编译器不会显示任何错误。

所以,我很困惑。如何background-image在 IE8 中使用 Less hack 进行设置。

0 投票
1 回答
51 浏览

javascript - 当 IE 中有兄弟 img 时,拖动不起作用

我正在尝试使用兄弟 img 制作一个拖动框,并且可以拖动“move-obj”。它可以在其他浏览器中正常运行,但 IE(8,9,10)除外。在 IE 中,当您悬停边框时,您可以拖动“move-obj”,但如果您删除标签“img”它可以正常工作。我发现如果我向“move-obj”添加背景颜色,它也会正确运行,但这不是我想要的。有人可以给我一些建议吗?这是代码笔

0 投票
1 回答
22 浏览

javascript - 如果背景有图像,则不能不选择 IE 中的元素

对不起,我又问了同样的问题,因为我没有把问题说清楚,所以没有人可以帮助我澄清我昨天的困惑。这是codepen(似乎无法在ie8中打开)。我想拖动'move-obj',但如果背景有图像,它在IE浏览器(8,9,10)中不起作用。如何让这个演示在 IE8 以上的 IE 浏览器上运行?