我不知道为什么会这样.我有一些非常直接的代码,在下面复制,除了IE 7和8之外,在所有浏览器中都能正常工作.在这些浏览器中,尝试扩展select中的选项列表会触发内置的弹出窗口阻止栏.
是什么赋予了?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
Test
</title>
</head>
<body>
<form action="/dynamic/main.4d?Support&demo2004_01&RD" method="post" id="signup" name="signup">
<fieldset id="selects">
<select name="bedrooms">
<option selected="selected" value="">
Bedrooms *
</option>
<option value="0">
Studio
</option>
<option value="1">
1 Bedroom
</option>
<option value="1.5">
Flex 2 Bedrooms
</option>
<option value="2">
2 Bedrooms
</option>
<option value="2.5">
Flex 3 Bedrooms
</option>
<option value="3">
3 Bedrooms
</option>
</select>
</fieldset>
</form>
</body>
</html>
Run Code Online (Sandbox Code Playgroud) html html-select popup internet-explorer-8 internet-explorer-7
我正在尝试使用带有break-word值的CSS word-wrap属性.我想在td中使用它,显然需要使用额外的div标签才能工作.精细.
我试图构建一个简化的用例:
HTML:
<table class="sectors">
<tr>
<td><div>HURTEAUX / Jean-Baptiste mr)</div></td>
<td><div>CHEUNJGgdfgdfvfsefsdfsdfsdfsdvvvHJG / Samuel mr</div></td>
<td><div>CHEUNG / Samuel mr)</div></td>
</tr>
</table>
Run Code Online (Sandbox Code Playgroud)
CSS
.sectors td {
border: 1px solid #000;
}
.sectors td div {
width: 150px;
word-wrap: break-word;
border: 1px solid red;
}
Run Code Online (Sandbox Code Playgroud)
Firefox,Chrome和Safari的行为符合预期(至少和我预期的一样).
但IE(IE6,IE7,IE8)有一个奇怪的行为:文本被正确包装在div(红色边框)内,但似乎td(黑色边框)无缘无故地分配额外的空间.
任何解决方法或解释?
我有以下代码:
<html>
Run Code Online (Sandbox Code Playgroud)
<style type="text/css">
DIV { display:inline; border: solid red 1px; }
.editable { background:yellow; }
</style>
Run Code Online (Sandbox Code Playgroud)
<div class="editable" contentEditable="true"> This is test text. This is test text.This is test text.This is test text.This is test text.Thihis is test text.This is test text.</div>
<div class="editable" contentEditable="true"> short </div>
<div class="editable" contentEditable="true"> This is test text.This is test text.This is test text.his is test text.Thihis is test text.Thihis is test text.Thihis is test text.Thi </div>
Run Code Online (Sandbox Code Playgroud)
我需要IE7(IE6不需要和FF3.x工作正常)正确包装文本,如果我从div中删除contentEditable ="true"它会这样做.只要尝试使用和不使用contentEditable的代码,你就会明白我的意思.使浏览器窗口足够小,以便您查看文本的包装方式.
谢谢.
嘿,为了尽可能地创建一个图像光源,我想创建两个音调hr.
我在现代浏览器中实现了这一点,但希望在ie6和7中实现相同的效果.
我正在使用的当前代码是
hr {
border-bottom:1px solid #FFFFFF;
border-top:1px solid #dcdcdc;
clear:both;
height:0;
border-left:0px;
border-right:0px;
}
Run Code Online (Sandbox Code Playgroud)
我试过,没有成功使这项工作在ie6和7,而不必专门针对浏览器.有什么想法吗?
(继承我当前的项目,我正在使用这个代码,并希望使它跨浏览器 - http://www.qwibbledesigns.co.uk/preview/aurelius/)
干杯
马特
我有以下标记,我试图让第二个表的右侧与其上方标题的右侧对齐.这适用于IE8,Firefox和Chrome,但在IE6/7中,表格被错误地拉伸以填充页面的宽度.
我使用的行程开关的hasLayout触发适用inline-block于IE6/7.
有谁知道如何(或者甚至)我只能填充inline-blockIE6/7中显示的包装元素的自然宽度?
您可以在http://jsbin.com/uyuva上看到现场运行的代码.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Test</title>
<style>
.wrapper {
display: inline-block;
border: 1px solid green;
}
/*
display: inline-block triggers the wrapper element to have layout for IE 6/7.
The trip switch then provides the inline component of the display behaviour.
See http://www.brunildo.org/test/InlineBlockLayout.html for more details.
*/
.wrapper {
*display: inline;
}
table {
border: 1px solid red;
}
</style>
</head>
<body>
<h1>No …Run Code Online (Sandbox Code Playgroud) css internet-explorer internet-explorer-7 internet-explorer-6
为什么IE的后续回退color: red;不起作用?
在IE7中,颜色black不是red.
现场演示
HTML:
<div>
<span>Hello</span>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS:
div {
width: 200px;
height: 100px;
background-color: blue;
text-align: center;
}
span {
font-size: 2em;
color: red;
color: rgba(250, 250, 97, 0.9);
}
Run Code Online (Sandbox Code Playgroud)
css颜色上的mozilla mdn列出了不同的选项color: value
color: <value>和值可以是关键字red或rgb(255,0,0)rgba(0,0,0,0) 假设我有一个html表,其css声明宽度为750px.它有5列,每列的宽度为50px,使用css声明(所有td的宽度均为50px).显然,列的宽度总和为250px,小于750px.
当浏览器呈现表时,每列具有不同的计算宽度.我有一个列只有5个空格,但计算宽度超过100px(远远超过5).
所有列都适合其包含的文本以及一些额外的空格.标记中没有硬编码列宽.在'td'的css中只有一个50px.
浏览器如何计算每列的渲染宽度?
我认为它下面的if条件 - 如果浏览器是IE和IE浏览器版本比9更新,但我没有IE 9来测试它所以很难知道正确的输出,这也不是100%我希望bcos这个脚本应该在其他浏览器上默认运行,如Chrome,Firefox等 - 是否可以在if条件下设置它?
if ($.browser.msie && parseInt($.browser.version) > 9)
{
// run this code
}
Run Code Online (Sandbox Code Playgroud)
我想使用if条件的原因是脚本似乎在IE 7上有错误,当然最好的办法是修复脚本,但我不知道IE的哪个部分不接受它(所有其他浏览器工作得很好!).你知道我可以用来调试IE 6,7,8等脚本的工具吗?我使用notepad ++编写我的jquery等,所以它不提供任何调试内容......
所以,我的下一个最佳解决方案是,如果它是早于9的IE浏览器,则不运行此脚本.
顺便说一句,这是IE7浏览器上显示的错误信息,但我永远无法理解!
Line:910 //which line?
Char:4 // what the hell is this?
Error: Object doesn't support this property or method //what?
Code: 0 // 0 of what?
URL: http://localhost/mysite/page-1 // so which file is causing the error then? the .js or .html or something else??
Run Code Online (Sandbox Code Playgroud)
血淋淋的IE!
谢谢.
我需要链接和按钮看起来一样,但是我无法以"按钮"标签的方式垂直对齐"a"标签内的文本.重要的是要注意标签需要能够处理多行文本(因此行高不起作用).
a,button {
display: inline-block;
-moz-box-sizing: border-box;
width: 150px;
height: 150px;
vertical-align: middle;
border: 1px solid #000;
text-align: center;
}
Run Code Online (Sandbox Code Playgroud)
请参阅下面的jsfiddle:
正如您所看到的,我可以使用内部的span标签和将"display:table"设置为"a"并将"display:table-cell"和"vertical-align:middle"设置为span,但这在IE7中不起作用.
a,button {
width: 150px;
height: 150px;
border: 1px solid #000;
text-align: center;
}
a {
display: table;
-moz-box-sizing: border-box;
}
a span, button span {
vertical-align: middle;
text-align: center;
}
a span {
display: table-cell;
}
Run Code Online (Sandbox Code Playgroud)
寻找一个简单的CSS解决方案.
(function (send) {
XMLHttpRequest.prototype.send = function () {
this.addEventListener('readystatechange', function() {
console.log('readyState changed');
}, false);
send.apply(this, arguments);
};
})(XMLHttpRequest.prototype.send);
Run Code Online (Sandbox Code Playgroud)
这有效,但它似乎正在影响其他框架(如jQuery).当我使用上面的代码时,我的jQuery ajax调用没有完成(IE7 + IE8).
有没有办法给事件一个新的别名,这样就不会引起任何冲突(我只是假设这是问题)?
而我无法使用this.onreadystatechange,因为jQuery会覆盖它(参见小提琴).
一旦我绑定事件监听器,代码似乎无声地失败,因此我无法使用控制台进行调试.
我需要这个的原因是我想要另一个框架(GWT)的全局ajax处理程序.我现在只使用jQuery进行测试.
编辑:看起来只有ie9支持addEventListener.但是,attachEventie7-8中的XHR对象似乎不存在.
javascript ajax jquery internet-explorer-8 internet-explorer-7
css ×6
html ×6
jquery ×2
ajax ×1
browser ×1
colors ×1
fallback ×1
firefox ×1
html-select ×1
if-statement ×1
javascript ×1
popup ×1
word-wrap ×1