<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: ActiveX пропадает фоновое изображение(IE11)]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=14638&amp;type=atom" />
	<updated>2019-03-08T18:19:06Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=14638</id>
		<entry>
			<title type="html"><![CDATA[AHK: ActiveX пропадает фоновое изображение(IE11)]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=132863#p132863" />
			<content type="html"><![CDATA[<p>Сразу напишу ответ, может кому пригодится.<br />Если задать путь к изображению не через тег img, а через свойство background:url(). То есть вероятность, что при запуске скрипта(AHK) фон может не прогрузиться/отобразиться.</p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header"><strong>+</strong>&nbsp;html.html</div><div class="fancy_spoiler"><div class="codebox"><pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
	&lt;head&gt;
		&lt;meta http-equiv=&#039;X-UA-Compatible&#039; content=&#039;IE=edge&#039;/&gt;
		&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=Windows-1251&quot;/&gt;
		&lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot;&gt;

		&lt;script type=&quot;text/javascript&quot; src=&quot;jquery-3.3.1.min.js&quot;&gt;&lt;/script&gt;
		&lt;script type=&quot;text/javascript&quot; src=&quot;script.js&quot;&gt;&lt;/script&gt;

	&lt;/head&gt;
	&lt;body&gt;
		&lt;span class=&quot;icon&quot;&gt;&lt;/span&gt;
	&lt;/body&gt;
&lt;/html&gt;</code></pre></div></div></div><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header"><strong>+</strong>&nbsp;style.css</div><div class="fancy_spoiler"><div class="codebox"><pre><code>.icon{
	background-image:url(&#039;любое_изображение.png&#039;);
	width:20px;height:20px;
}
</code></pre></div></div></div><p>Дефект наблюдается при наличии тегов script в файле html. Исправляется добавлением к тегу атрибута defer.<br /></p><div class="codebox"><pre><code>&lt;script type=&quot;text/javascript&quot; defer src=&quot;script.js&quot;&gt;&lt;/script&gt;</code></pre></div><br /><br /><p>UP: дефект проскакивал намного реже, но проскакивал. <img src="//forum.script-coding.com/img/smilies/neutral.png" width="15" height="15" /> Еще одно решение:<br /></p><div class="codebox"><pre><code>&lt;html&gt;
	&lt;head&gt;
	&lt;/head&gt;
	&lt;body&gt;
		...
	&lt;/body&gt;
&lt;script type=&quot;text/javascript&quot; defer src=&quot;default.js&quot;&gt;&lt;/script&gt;
&lt;html&gt;
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[MandarinKa02]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34409</uri>
			</author>
			<updated>2019-03-08T18:19:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=132863#p132863</id>
		</entry>
</feed>
