ie

你不知道的Canvas(二)

僤鯓⒐⒋嵵緔 提交于 2019-12-03 13:51:25
你不知道的Canvas(二) 一、色彩Colors 到目前为止,我们只看到过绘制内容的方法。如果我们想要给图形上色,有两个重要的属性可以做到: fillStyle 和 strokeStyle。 fillStyle = color 设置图形的填充颜色。 strokeStyle = color 设置图形轮廓的颜色。 color 可以是表示 CSS 颜色值的字符串,渐变对象或者图案对象。默认情况下,线条和填充颜色都是黑色(CSS 颜色值 #000000 )。 输入的应该是符合 CSS3 颜色值标准 的有效字符串。下面的例子都表示同一种颜色。 // 这些 fillStyle 的值均为 '橙色' ctx.fillStyle = "orange"; ctx.fillStyle = "#FFA500"; ctx.fillStyle = "rgb(255,165,0)"; ctx.fillStyle = "rgba(255,165,0,1)"; 1.fillStyle--调色板 在本示例里,用两层 for 循环来绘制方格阵列,每个方格不同的颜色。结果如右图,但实现所用的代码却没那么绚丽。我用了两个变量 i 和 j 来为每一个方格产生唯一的 RGB 色彩值,其中仅修改红色和绿色通道的值,而保持蓝色通道的值不变。你可以通过修改这些颜色通道的值来产生各种各样的色板。通过增加渐变的频率,你还可以绘制出类似

解决ie低版本不认识html5标签

不想你离开。 提交于 2019-12-03 13:07:49
在不支持 HTML5 新标签的浏览器里,会将这些新的标签解析成行内元素( inline )对待,所以我们只需要将其转换成块元素( block )即可使用,但是在 IE9 版本以下,并不能正常解析这些新标签,但是却可以识别通过 document.createElement('tagName') 创建的自定义标签,于是我们的解决方案就是将 HTML5 的新标签全部通过 document.createElement ('tagName')来创建一遍,这样 IE 低版本也能正常解析 HTML5 新标签了。 处理方式:在实际开发中我们更多采用的是通过检测IE浏览器的版本来加载三方的一个JS库来解决兼容问题(测试在IE下面的兼容性:ieTester软件的使用) html5shiv :解决ie9以下浏览器对html5新增标签的不识别,并导致CSS不起作用的问题。 respond :让不支持css3 Media Query的浏览器包括IE6-IE8等其他浏览器支持查询。 我们解决的问题, 主要是针对于 ie 低版本的,也就是只有低版本 ie 才执行才对。 <!--[if lt IE 9]>   <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.js"></script>   <script src="http://cdn.bootcss

一行代码解决各种IE兼容问题,IE6,IE7,IE8,IE9,IE10

南笙酒味 提交于 2019-12-03 12:59:35
一行代码解决各种IE兼容问题,IE6,IE7,IE8,IE9,IE10 2012-04-25 16:29:04| 分类: 学习 |字号 订阅 在网站开发中不免因为各种兼容问题苦恼,针对兼容问题,其实IE给出了解决方案Google也给出了解决方案 百度也应用了这种方案去解决IE的兼容问题 百度源代码如下 <!Doctype html> <html xmlns=http://www.w3.org/1999/xhtml xmlns:bd=http://www.baidu.com/2010/xbdml> <head> <meta http-equiv=Content-Type content=“text/html;charset=utf-8″> <meta http-equiv=X-UA-Compatible content=IE=EmulateIE7> <title>百度一下,你就知道 </title> <script>var wpo={start:new Date*1,pid:109,page:‘superpage’}</script> <meta http-equiv=X-UA-Compatible content=IE=EmulateIE7> 可以打开百度,右键查看源码看下!我们可以看下文件头是否存在这样一行代码! 这句话的意思是强制使用IE7模式来解析网页代码!

子div撑不开父div的几种解决办法:

青春壹個敷衍的年華 提交于 2019-12-03 10:22:44
文章: 子div撑不开父div的几种解决办法: 1,可以在所有子元素后增加<div style="clear:both;"></div> 2,给父容器增加样式: .clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } 兼容IE样式: /* Hides from IE-mac \*/ * html .clearfix {height: 1%;} /* End hide from IE-mac */ 3,父容器增加样式:overflow:hidden 感觉第三种方法最为简单。 来源: https://www.cnblogs.com/Tpf386/p/11790849.html

VBA IE automation - wait for the download to complete

匿名 (未验证) 提交于 2019-12-03 10:10:24
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to automate some tasks which are being done through Internet explorer, which include downloading a file and then copying it to a different directory and renaming it. I was more or less successful in finding the information on how to do this, the code is working, but it has exceptions, therefore I would be grateful if someone could help me to improve this code. There are two things I would like to do: Insert a loop, so that the script would wait for certain elements to appear and only then would proceed with execution. I have

Why is XDomainRequest Not Working In IE8 or IE9

匿名 (未验证) 提交于 2019-12-03 10:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Below is an XDomainRequest being made from javascript to a PHP Backend on Nginx on a different subdomain. The return result always executes the error function, and XDomainRequest doesn't give debugging details. Is there something wrong with the code? Javascript var xdr = new XDomainRequest (); xdr . open ( method . toLowerCase (), url ); timeout = 10000 ; // Required to XDomainRequest works xdr . timeout = timeout ; xdr . onprogress = function () {}; xdr . ontimeout = function () { completeRequest ( callback , 408 , 'Timeout' ,

IE problem with CSS file

匿名 (未验证) 提交于 2019-12-03 09:17:17
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: After the upload of a new site version to the Production environment - the site is displayed incorrectly in IE, tested versions 6 and 8. While on the local version of the site (UAT environment) everything is fine. After the short investigation I found out that IE just changes the CSS file itslef. It is starting from ~line 1740 with the follwing: in the correct CSS version: .add-topic-form .title, .add-topic-form .tags, .add-topic-form .original_author, .add-topic-form .original_link, .add-topic-form .link-url { margin-top: 5px; width: 95%; }

html5boilerplate IE conditional not working

匿名 (未验证) 提交于 2019-12-03 09:14:57
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Ok, this is the first time I am using html5boilerplate, but cant get the IE styles to work from my css file. I have this in the header (as per page setting) <!doctype html> <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ --> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> <!-- Consider adding a manifest.appcache: h5bp.com/d/Offline --> <!--

How to write one IE conditional comment to target all IE versions at once?

匿名 (未验证) 提交于 2019-12-03 09:06:55
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to use a JavaScript only for all IE version 6,7 and 8. 回答1: Nested conditions ( WRONG ): <!--[if lte IE 8]> <!--[if gte IE 6]> <!-- your stuff here --> <![endif]--> <![endif]--> EDIT: As Martha highlighted, nested condition don't work, use " & ": <!--[if (lte IE 8) & (gte IE 6)]> <!-- your stuff here --> <![endif]--> Other examples from MSDN : <!--[if IE]><p>You are using Internet Explorer.</p><![endif]--> <![if !IE]><p>You are not using Internet Explorer.</p><![endif]> <!--[if IE 7]><p>Welcome to Internet Explorer 7!</p><![endif]-->

getJson not running in IE 11 on external computers

匿名 (未验证) 提交于 2019-12-03 09:05:37
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm building a simple WebAPI 2 service based on the MVC model. I've created a simple front-end index.html page which has a button to invoke the getJSON call, passing a relative URI. If this succeeds it should display an alert box. On the local dev machine, everything works for both IE and Chrome . However, when I try accessing from another computer on the network, it stops working in IE, but still works ok in Chrome. All of my IE are version 11. Below is the getJson code snippet. I have tried many suggestions from other posts such as using