⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 css_dont.asp@output=print

📁 W3Schools tutorial..web designing
💻 ASP@OUTPUT=PRINT
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>

<title>CSS Don't</title>
 
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Keywords" content="xml,tutorial,html,dhtml,css,xsl,xhtml,javascript,asp,ado,vbscript,dom,sql,colors,soap,php,authoring,programming,training,learning,beginner's guide,primer,lessons,school,howto,reference,examples,samples,source code,tags,demos,tips,links,FAQ,tag list,forms,frames,color table,w3c,cascading style sheets,active server pages,dynamic html,internet,database,development,Web building,Webmaster,html guide" />

<meta name="Description" content="Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building." />

<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "../../https@ssl./default.htm" : "../../www./default.htm");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3855518-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>

</head>
<body>

<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>

<h1>CSS Don't</h1>
<a href="css_mediatypes.asp"><img border="0" src="../images/btn_previous.gif" alt="Previous" /></a>
<a href="css_summary.asp"><img border="0" src="../images/btn_next.gif" width="100" height="20" alt="Next" /></a>
<hr />

<p class="intro">Here are some technologies you should try to avoid when 
using CSS.</p>

<hr />

<h2>Internet Explorer Behaviors</h2>
<p><b>What is it? </b>Internet Explorer 5 introduced behaviors. Behaviors are a 
way to add behaviors to HTML elements with the use of CSS styles.</p>
<p><b>Why avoid it?</b> The behavior attribute is only supported by Internet Explorer.</p>
<p><b>What to use instead? </b>Use JavaScript and 
<a href="../htmldom/dom_obj_style.asp">HTML DOM</a> instead.</p>
<hr />
<h2>Example 1 - Mouseover Highlight</h2>

<p>The following HTML file has a &lt;style&gt; element that defines a behavior for the &lt;h1&gt;
element:</p>

<table border="1" width="100%" class="ex" cellspacing="0" id="table11">
<tr><td width="100%">
<pre>&lt;html&gt;
&lt;head&gt;
&lt;style type=&quot;text/css&quot;&gt;
h1 { behavior: url(behave.htc) }
&lt;/style&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;h1&gt;Mouse over me!!!&lt;/h1&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
</td></tr></table>

<p>The XML document &quot;behave.htc&quot; is shown below:</p>

<table border="1" width="100%" class="ex" cellspacing="0" id="table12">
<tr><td width="100%">
<pre>&lt;attach for=&quot;element&quot; event=&quot;onmouseover&quot; handler=&quot;hig_lite&quot; /&gt;
&lt;attach for=&quot;element&quot; event=&quot;onmouseout&quot; handler=&quot;low_lite&quot; /&gt;

&lt;script type=&quot;text/javascript&quot;&gt;
function hig_lite()
{
element.style.color='red';
}</pre>
<pre>function low_lite()
{
element.style.color='blue';
}
&lt;/script&gt;</pre>
</td></tr></table>

<p>The behavior file contains a JavaScript and event
handlers for the elements.</p>
<p>If you use Internet Explorer, <a target="_blank" href="tryit.asp@filename=behave">try it yourself</a> (mouse over the text 
in the example).</p>
<h2>Example 2 - Typewriter Simulation</h2>

<p>The following HTML file has a &lt;style&gt; element that defines a behavior 
for elements with an id of &quot;typing&quot;:</p>

<table border="1" width="100%" class="ex" cellspacing="0" id="table13">
<tr><td width="100%">
<pre>&lt;html&gt;
&lt;head&gt;
&lt;style type=&quot;text/css&quot;&gt;
#typing
{
behavior:url(behave_typing.htc);
font-family:&quot;courier new&quot;;
}
&lt;/style&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;span id=&quot;typing&quot; speed=&quot;100&quot;&gt;IE5 introduced DHTML behaviors.
Behaviors are a way to add DHTML functionality to HTML elements
with the ease of CSS.&lt;br /&gt;&lt;br /&gt;How do behaviors work?&lt;br /&gt;
By using XML we can link behaviors to any element in a web page
and manipulate that element.&lt;/p&gt;
&lt;/span&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
</td></tr></table>

<p>The XML document &quot;typing.htc&quot; is shown below:</p>

<table border="1" width="100%" class="ex" cellspacing="0" id="table14">
<tr><td width="100%">
<pre>&lt;attach for=&quot;window&quot; event=&quot;onload&quot; handler=&quot;beginTyping&quot; /&gt;
&lt;method name=&quot;type&quot; /&gt;</pre>
<pre>&lt;script type=&quot;text/javascript&quot;&gt;
var i,text1,text2,textLength,t;</pre>
<pre>function beginTyping()
{
i=0;
text1=element.innerText;
textLength=text1.length;
element.innerText=&quot;&quot;;
text2=&quot;&quot;;
t=window.setInterval(element.id+&quot;.type()&quot;,speed);
}</pre>
<pre>function type()
{
text2=text2+text1.substring(i,i+1);
element.innerText=text2;
i=i+1;
if (i==textLength)
  {
  clearInterval(t);
  }
}
&lt;/script&gt;</pre>
</td></tr></table>

<p>If you use Internet Explorer, 
<a target="_blank" href="tryit.asp@filename=behave_typing">try it yourself</a>.</p>

<hr />

<a href="css_mediatypes.asp"><img border="0" src="../images/btn_previous.gif" width="100" height="20" alt="Previous" /></a>
<a href="css_summary.asp"><img border="0" src="../images/btn_next.gif" width="100" height="20" alt="Next" /></a>

<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -