即使文档模式已修复,IE8也会根据浏览器模式呈现不同的网页 - Intranet网站(IE8 renders web page differently based on browser mode even though document mode is fixed - Intranet site)
我发现IE8基于浏览器模式呈现不同的网页,尽管文档模式始终设置相同。 这是IE8的错误吗?
背景是:
- IE8(SOE的一部分)正在查看企业内部网。
- 在兼容性设置中勾选在兼容模式下显示Intranet站点。
- 我正在使用元标记方法强制我的Intranet页面的文档模式:
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
- 这导致浏览器模式设置为IE8 Compat,文档模式设置为IE8标准。
到目前为止,这一切都很好,没有任何问题,我期望的页面布局等等。
最近刚添加了一些功能(我不会说现阶段的问题 - 关于页面渲染模式的问题)并且页面布局不正确。 在开发人员工具栏中将浏览器模式更改为IE8(或在兼容性视图设置中取消选中)可修复布局问题。 这让我感到惊讶,因为文档模式没有变化。
所以要重新组合组合:
Broswer Mode=IE8 Compat, Document Mode=IE8 Standards
[已破]Broswer Mode=IE8, Document Mode=IE8 Standards
[工程]文档模式是相同的,唯一改变的是浏览器模式。 我认为文档模式是影响页面呈现的唯一因素,浏览器模式基本上只影响请求中发送的UA字符串。 我纠正了,还是我错了? 如果我是正确的,那么一旦确定了文档模式,那么浏览器模式应该对渲染没有任何影响。 这是IE8中的错误吗? 或者我错了? 即使使用相同的文档模式,浏览器模式是否会影响渲染?
限制:
- 我无法控制在所有用户的兼容性视图设置中的兼容性视图中显示内部网:公司内部网,我们有其他遗留应用程序,过多的测试以确保它们都在标准模式下工作,永远不会获得批准来制作该类型全球变化)。
- 我无法为所有用户升级浏览器。 我们刚刚完成了从IE6升级到IE8的6个月以上的项目。
I am finding that IE8 renders web pages differently based on Browser mode despite Document mode always being set the same. Is this an IE8 bug?
Background is:
- A corporate intranet being viewed by IE8 (part of the SOE).
- Display Intranet sites in compatibility mode is ticked in compatibility settings.
- I am forcing document mode for my intranet pages by using the meta tag approach:
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
- This results in Browser mode set to IE8 Compat, and Document mode set to IE8 Standards.
So far this has all been good, no issues whatsoever, pages layout as I expect, etc etc.
Just recently some functionality was added (I won't say what at this stage - the question is about page rendering modes) and the page is laying out incorrectly. Changing the Browser mode to IE8 in Developer Toolbar (or unticking in Compatibility View Settings) fixes the layout issues. This surprised me as the Document mode is unchanged.
So to re-cap the combinations:
Broswer Mode=IE8 Compat, Document Mode=IE8 Standards
[broken]Broswer Mode=IE8, Document Mode=IE8 Standards
[works]The document mode is the same, the only thing changing is the browser mode. I thought the document mode is the only thing that should affect page rendering, and that browser mode only affects, basically, the UA string sent in the request. Am I correct, or do I have it wrong? If I am correct then once document mode is determined then browser mode should have no affect at all on rendering. Is this a bug in IE8? Or am I wrong? Does the browser mode affect rendering even if the same document mode is used?
Limitations:
- I have no control over unticking Display intranets in compatibility view in compatibility view settings for all our users (corporate intranet, we have other legacy apps, too much testing to make sure they all work in Standards mode, would never get approval to make that type of global change).
- I have no option to upgrade browser for all users. We only just finished a 6+ month project upgrading from IE6 to IE8.
原文:https://stackoverflow.com/questions/15800605
最满意答案
简短版:是的,它是。
长版本:是的,它是,但您需要具体说明要为rgb检查哪个像素。 如果你想获得调色板然后使用Android的调色板库 - 它将从指定的视图中提取原色。
Short version: Yes, it is.
Long version: Yes, it is, but You need to be specific about which pixel You want to examine for rgb. If You want to just get color palette then use Palette library from Android - it will extract primary colors from specified view.
相关问答
更多-
Mat.get(x, y) - 返回Mat.get(x, y)所有通道值的数组 ,每个通道在不同的地方。 如果你的图像是RGB,所以你会得到一个[r,g,b]的数组。 Mat.put(x, y, value) - 将(x,y)处的通道值设置为value 。 double[] rgb = image.get(0, 0); Log.i("", "red:"+rgb[0]+"green:"+rgb[1]+"blue:"+rgb[2]); image.put(0, 0, new double[]{255, 255, ...
-
const CGFloat *colors = CGColorGetComponents( curView.backgroundColor.CGColor ); 这些链接提供了更多细节: UIColor参考 CGColorGetComponents参考 const CGFloat *colors = CGColorGetComponents( curView.backgroundColor.CGColor ); These links provide further details: UIColor R ...
-
如果你想显示HSV格式图像,试试这个代码(我没有测试它,但它应该工作。) Mat mRgba = inputFrame.rgba(); // mBgr is Mat in BGR Format Imgproc.cvtColor(rgba, mBgr, Imgproc.COLOR_RGBA2BGR, 3); // mHsv is Mat in Hsv Format Imgproc.cvtColor(mBgr, mHsv, Imgproc.COLOR_BGR2HSV, 3); // To display the ...
-
这是由于ios10和新设备屏幕的新扩展颜色gammut造成的问题。 点击颜色选择器中“RGB滑块”右侧的滚轮,然后选择sRGB IEC61966 2-1。 您将看到RGB值将在此时改变。 将它们放回您先前输入的RGB值。 应该是这样! This is an issue due to iOS 10 and the new extended color gamut of the new devices screens. Click on the wheel at the right of "RGB slider ...
-
您正在使用setImageBitmap()在图像视图中设置“前景”位图,然后使用getBackground()检索背景。 后台为null并在其上调用getBitmap()将为NPE。 使用getDrawable()代替getBackground() 。 You're using setImageBitmap() to set a "foreground" bitmap in the image view but then retrieving the background with getBackgroun ...
-
看起来模拟器正在执行伽马校正。 监视器的伽玛值通常约为1.2。 在显示之前,您发送到监视器的任何RGB通道值(0.0-1.0)都将被提升到该指数。 仿真器似乎使用大约0.87的伽玛来补偿。 虽然值会有所不同,但模拟器上的颜色将更接近设备上的颜色。 It looks like the emulator is performing gamma correction. Monitors typically have a gamma value of around 1.2. Any RGB channel valu ...
-
这就是你要找的。 这是github上的一个演示项目。 另外,请查看此内容以及此内容。 This is what you are looking for. It is a demo project on github. Also, look into this and this on SO.
-
我在你的代码中看到了一些冲突(奇怪!)。 第一个,如果你正确计算颜色,所以如果大于255或小于0,则不需要检查值,我的意思是这些行。 if(redValue > 255) redValue = 255; if(redValue < 0) redValue = 0; if(greenValue > 255) greenValue = 255; if(greenValue < 0) greenValue = 0; if(blueValue > 255) blueValue ...
-
您想要将十六进制颜色值转换为RGB。 int red = (color >> 16) & 0xFF; int green = (color >> 8) & 0xFF; int blue = (color >> 0) & 0xFF; You want to convert hexadecimal color value to RGB. int red = (color >> 16) & 0xFF; int green = (color >> 8) & 0xFF; int blue = (color >> 0 ...
-
简短版:是的,它是。 长版本:是的,它是,但您需要具体说明要为rgb检查哪个像素。 如果你想获得调色板然后使用Android的调色板库 - 它将从指定的视图中提取原色。 Short version: Yes, it is. Long version: Yes, it is, but You need to be specific about which pixel You want to examine for rgb. If You want to just get color palette then ...