(1)用expression 鼠标滑过变色: <style type="text/css"><!-- table { background-color:#000000; cursor:hand; width:100%; }td { onmouseover: expression(onmouseover=function (){this.style.borderColor ='blue';this.style.color='red';this.style.backgro…
(1)用expression 鼠标滑过变色: <style type="text/css"><!-- table { background-color:#000000; cursor:hand; width:100%; }td { onmouseover: expression(onmouseover=function (){this.style.borderColor ='blue';this.style.color='red';this.style.backgro…
只是加载时候隔行变一个颜色,鼠标滑动上去时候没有变化 <table width="800" border="0" cellpadding="0" cellspacing="0"> <tr> <td>不变色</td> </tr> <tbody id="goaler"> <tr> <td>xxxxxxxx</t…
var table = objj.getElementsByTagName('table'); alert(table[i].width); if(table==null) return; for(var i=0; i<table.length; i++) { if(table[i].width>parseInt(objj.style.width)) { table[i].style.width = objj.style.width; } } 注:table[i].width为整形,table…
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Typ…
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title>幻灯片效果</title> <style type="text/css"> *{ margin: 0; padding: 0; } body{ padding: 50px 10%; } .slider .main,.slide…
CSS<style> body { font: 200%/1.45 charter; } ref::before { content: '\00A7'; letter-spacing: .1em; } </style>JS并不能获取到元素因为是伪的假的元素得还去改变styledocument.styleSheets[0].addRule('.red::before','color: green'); http://pankajparashar.com/posts/modify-ps…
一. 通过css控制table y方向上滚动 html中没有滚动条,可以根据overflow属性的scroll来对table显示不完全的内容进行滚动. 只是y方向上滚动,很简单,只要设置div的height高度.然后设置overflow-y:scroll.这样当内容高度超过了height设定的高度,就会出现滚动条 css: .scroll_y{ max-height: 200px; /* 宽度大概比表头宽17px,具体值实际调试 */ width:531px; overflow-y: scrol…
[css或js控制图片自适应]图片自动适应大小是一个非常常用的功能,在进行制作的时候为了防止图片撑开容器而对图片的尺寸进行必要的控制,我们可不可以用CSS控制图片使它自适应大小呢?此个人博客想到了一个比较简单的解决方法,虽然不是非常的完美,如果您的要求不是非常高,已经可以满足你的需要了.我们看下面的代码:div img {max-width:600px;width:600px;width:expression(document.body.clientWidth>600?”600px”:”auto…
JS控制CSS所使用的方法: <style> .rule{ display: none; } </style> 你想要改变把他的display属性由none改为inline. 解决办法: 在IE里: document.styleSheets[0].rules[0].style.display = "inline"; 在firefox里: document.styleSheets[0].cssRules[0].style.display = "inlin…