光阴流逝似水流年,这是你我生活的年代,也是对时光的悼念,对光阴的祭奠,对年代的凭吊,对岁月的致敬...
联想TC-5M 证书

去除了 黑潮 开机LOGO

点击在新窗口中浏览此图片

修改为SLIC2.1的 bios文件下载 :

原bios BI5X1KA5版下载:


<!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>
<title>35sou.com - 兼容IE和FireFox的间隔滚动代码</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<style type="text/css">
<!--
* { font-size: 12px; font-family: Verdana,Tahoma,Arial; padding: 0; margin: 0; }
body { padding: 30px; }
a { color: #000; text-decoration: none; }
a:hover { color: #F60; }
#andyscroll {
    overflow: hidden;
    height: 18px;
    background: #E8F8F8;
    padding: 0 10px;
}
#scrollmessage {
    float: left;
    text-align: left;
}
#scrollmessage li {
    line-height: 18px;
}
-->
</style>
</head>
<body>

<div id="andyscroll">
<div id="scrollmessage">
  <ul>
    <li><a href="http://www.35sou.com/">上网做生意,首选商务搜</a></li>
    <li><a href="http://www.35sou.com/">中小企业的免费网络贸易平台</a></li>
  </ul>
</div>
</div>

<script type="text/javascript">
<!--
try{
  var marqueesHeight = 18;
  var stopscroll     = false;

  var scrollElem = document.getElementById("andyscroll");
  with(scrollElem){
    style.width     = 300;
    style.height    = marqueesHeight;
    style.overflow  = 'hidden';
    noWrap          = true;
  }

  scrollElem.onmouseover = new Function('stopscroll = true');
  scrollElem.onmouseout  = new Function('stopscroll = false');

  var preTop     = 0;
  var currentTop = 0;
  var stoptime   = 0;

      var leftElem = document.getElementById("scrollmessage");

  scrollElem.appendChild(leftElem.cloneNode(true));

      
  init_srolltext();

}catch(e) {}

function init_srolltext(){
  scrollElem.scrollTop = 0;
  setInterval('scrollUp()', 15);
}

function scrollUp(){
  if(stopscroll) return;
  currentTop += 1;
  if(currentTop == 19) {
    stoptime += 1;
    currentTop -= 1;
    if(stoptime == 180) {
      currentTop = 0;
      stoptime = 0;
    }
  }else{
    preTop = scrollElem.scrollTop;
    scrollElem.scrollTop += 1;
    if(preTop == scrollElem.scrollTop){
      scrollElem.scrollTop = 0;
      scrollElem.scrollTop += 1;
    }
  }
}
//-->
</script>
</body>
</html>

Tags: , , , ,


<!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-Type" content="text/html; charset=gb2312" />
<title>JavaScript 无缝八向滚动(兼容ie/ff)</title>
</head>
<body>
<script type="text/javascript">
var $ = function (id) {
return "string" == typeof id ? document.getElementById(id) : id;
};

var Class = {
create: function() {
return function() {
this.initialize.apply(this, arguments);
}
}
}

Object.extend = function(destination, source) {
for (var property in source) {
destination[property] = source[property];
}
return destination;
}

function addEventHandler(oTarget, sEventType, fnHandler) {
if (oTarget.addEventListener) {
oTarget.addEventListener(sEventType, fnHandler, false);
} else if (oTarget.attachEvent) {
oTarget.attachEvent("on" + sEventType, fnHandler);
} else {
oTarget["on" + sEventType] = fnHandler;
}
};


var Scroller = Class.create();
Scroller.prototype = {
initialize: function(idScroller, idScrollMid, options) {
var oScroll = this, oScroller = $(idScroller), oScrollMid = $(idScrollMid);

this.SetOptions(options);
this.scroller = oScroller; //对象
this.timer = null; //时间
this.Side = []; //方向
this.side = 0; //参数

//方向设置
switch (this.options.Side.toLowerCase()) {
case "right-down" :
this.Side = ["right", "down"];
break;
case "right-up" :
this.Side = ["right", "up"];
break;
case "left-down" :
this.Side = ["left", "down"];
break;
case "left-up" :
this.Side = ["left", "up"];
break;
case "right" :
this.Side = ["right"];
break;
case "left" :
this.Side = ["left"];
break;
case "down" :
this.Side = ["down"];
break;
case "up" :
default :
this.Side = ["up"];
}

//用于上下滚动
this.heightScroller = parseInt(oScroller.style.height) || oScroller.offsetHeight;
this.heightList = oScrollMid.offsetHeight;

//用于左右滚动
this.widthScroller = parseInt(oScroller.style.width) || oScroller.offsetWidth;
this.widthList = oScrollMid.offsetWidth;

//js取不到css设置的height和width

oScroller.style.overflow = "hidden";
oScrollMid.appendChild(oScrollMid.cloneNode(true));
oScrollMid.appendChild(oScrollMid.cloneNode(true));

addEventHandler(oScroller, "mouseover", function() { oScroll.Stop(); });
addEventHandler(oScroller, "mouseout", function() { oScroll.Start(); });

this.Start();
},
//设置默认属性
SetOptions: function(options) {
this.options = {//默认值
Step: 1,//每次变化的px量
Speed: 20,//速度(越大越慢)
Side: "up"//滚动方向:"up"是上,"down"是下,"left"是左,"right"是右
};
Object.extend(this.options, options || {});
},
//上下滚动
ScrollUpDown: function() {
this.scroller.scrollTop = this.GetScroll(this.scroller.scrollTop, this.heightScroller, this.heightList);

var oThis = this;
this.timer = window.setTimeout(function(){ oThis.Start(); }, this.options.Speed);
},
//左右滚动
ScrollLeftRight: function() {
//注意:scrollLeft超过1400会自动变回1400 注意长度
this.scroller.scrollLeft = this.GetScroll(this.scroller.scrollLeft, this.widthScroller, this.widthList);

var oThis = this;
this.timer = window.setTimeout(function(){ oThis.Start(); }, this.options.Speed);
},
//获取设置滚动数据
GetScroll: function(iScroll, iScroller, iList) {
if(this.side > 0){
if(iScroll >= (iList * 2 - iScroller)){ iScroll -= iList; }
} else {
if(iScroll <= 0){ iScroll += iList; }
}

return (iScroll + this.options.Step * this.side);
},
//开始
Start: function() {

this.Side.push(this.Side.shift().toLowerCase());

//document.getElementById("test").innerHTML+=s+",";

//方向设置
switch (this.Side[0].toLowerCase()) {
case "right" :
if(this.widthList < this.widthScroller) return;
this.side = -1;
this.ScrollLeftRight();
break;
case "left" :
if(this.widthList < this.widthScroller) return;
this.side = 1;
this.ScrollLeftRight();
break;
case "down" :
if(this.heightList < this.heightScroller) return;
this.side = -1;
this.ScrollUpDown();
break;
case "up" :
default :
if(this.heightList < this.heightScroller) return;
this.side = 1;
this.ScrollUpDown();
}
},
//停止
Stop: function() {
clearTimeout(this.timer);
}
};

window.onload = function(){
new Scroller("idScroller", "idScrollMid",{ Side:"left-down" });
new Scroller("idScroller1", "idScrollMid1",{ Side:"left-up" });
new Scroller("idScroller2", "idScrollMid2",{ Side:"right-down" });
new Scroller("idScroller3", "idScrollMid3",{ Side:"right-up" });

new Scroller("idScroller4", "idScrollMid4",{ Side:"left-up" });
new Scroller("idScroller5", "idScrollMid5",{ Side:"right-up" });
new Scroller("idScroller6", "idScrollMid6",{ Side:"left-down" });
new Scroller("idScroller7", "idScrollMid7",{ Side:"right-down" });

new Scroller("idScroller8", "idScrollMid8",{ Side:"right-down" });
new Scroller("idScroller9", "idScrollMid9",{ Side:"left-down" });
new Scroller("idScroller10", "idScrollMid10",{ Side:"right-up" });
new Scroller("idScroller11", "idScrollMid11",{ Side:"left-up" });
}
</script>
<style>
*{}{margin:0px; padding:0px;}

.Scroller {}{line-height:50px;overflow:hidden; border:1px solid #000000;}
.ScrollMid {}{float:left;}
.ScrollMid ul{}{width:250px;float:left;overflow:hidden;}
.ScrollMid li{}{list-style:none;}

.Scroller2 {}{overflow:hidden;float:left;}
.ScrollMid2 {}{float:left;}
.ScrollMid2 ul{}{width:100px;height:100px;float:left;overflow:hidden;}
.ScrollMid2 li{}{list-style:none; width:100px; height:100px;}
</style>
<div id="idScroller" class="Scroller" style="width:250px; height:50px;">
<div style="width:500px">
<div id="idScrollMid" class="ScrollMid">
<ul>
<li> <a href="http://35sou.com/">1111111111111111111111</a></li>
</ul>
</div>
</div>
</div>
<br />
<br />
<div id="idScroller1" class="Scroller" style="width:250px; height:50px;">
<div style="width:500px">
<div id="idScrollMid1" class="ScrollMid">
<ul>
<li> <a href="http://35sou.com/">1111111111111111111111</a></li>
</ul>
</div>
</div>
</div>
<br />
<br />
<div id="idScroller2" class="Scroller" style="width:250px; height:50px;">
<div style="width:500px">
<div id="idScrollMid2" class="ScrollMid">
<ul>
<li> <a href="http://35sou.com/">1111111111111111111111</a></li>
</ul>
</div>
</div>
</div>
<br />
<br />
<div id="idScroller3" class="Scroller" style="width:250px; height:50px;">
<div style="width:500px">
<div id="idScrollMid3" class="ScrollMid">
<ul>
<li> <a href="http://35sou.com/">1111111111111111111111</a></li>
</ul>
</div>
</div>
</div>


<br /><br />

<div style="width:200px;">
<div id="idScroller4" class="Scroller2" style="width:100px; height:100px;">
<div style="width:200px">
<div id="idScrollMid4" class="ScrollMid2">
<ul>
<li style="background:url(1.gif);"> </li>
</ul>
</div>
</div>
</div>
<div id="idScroller5" class="Scroller2" style="width:100px; height:100px;">
<div style="width:200px">
<div id="idScrollMid5" class="ScrollMid2">
<ul>
<li style="background:url(2.gif);"> </li>
</ul>
</div>
</div>
</div>
<div id="idScroller6" class="Scroller2" style="width:100px; height:100px;">
<div style="width:200px">
<div id="idScrollMid6" class="ScrollMid2">
<ul>
<li style="background:url(2.gif);"> </li>
</ul>
</div>
</div>
</div>
<div id="idScroller7" class="Scroller2" style="width:100px; height:100px;">
<div style="width:200px">
<div id="idScrollMid7" class="ScrollMid2">
<ul>
<li style="background:url(1.gif);"> </li>
</ul>
</div>
</div>
</div>
</div>

<br /><br />
<div style="width:200px;">
<div id="idScroller8" class="Scroller2" style="width:100px; height:100px;">
<div style="width:200px">
<div id="idScrollMid8" class="ScrollMid2">
<ul>
<li style="background:url(2.gif);"> </li>
</ul>
</div>
</div>
</div>
<div id="idScroller9" class="Scroller2" style="width:100px; height:100px;">
<div style="width:200px">
<div id="idScrollMid9" class="ScrollMid2">
<ul>
<li style="background:url(1.gif);"> </li>
</ul>
</div>
</div>
</div>
<div id="idScroller10" class="Scroller2" style="width:100px; height:100px;">
<div style="width:200px">
<div id="idScrollMid10" class="ScrollMid2">
<ul>
<li style="background:url(1.gif);"> </li>
</ul>
</div>
</div>
</div>
<div id="idScroller11" class="Scroller2" style="width:100px; height:100px;">
<div style="width:200px">
<div id="idScrollMid11" class="ScrollMid2">
<ul>
<li style="background:url(2.gif);"> </li>
</ul>
</div>
</div>
</div>
</div>
<div id="test"></div>
</body>
</html>
Tags: , , , , , ,
在我们设计网页的时候,总会遇到一些不愉快的事情,最常见的莫过于在后台添加内容后才发现显示的页面被撑开,导致网页极度不美观。以前大家基本上都是设计表格,网上自然不少对于的解决方法,如今还有div+css标准设计,很少看到相关好的方法,现在潇湘在线把平时找到的防止表格被撑开的好方法总结归纳一下,和大家一起分享。

一、直接在网页里设置图片大小,比如代码:
<img src="http://www.krjpg.cn/www.xxol.net.jpg" width="600" height="500" border="0">
,这样虽然可以限制了图片大小,但是需要在上传图片之前手动修改图片大小,否则上传的图片就会变形。

二、使用如下代码:
<img src="http://www.krjpg.cn/www.xxol.net.jpg" onload="javascript:if(this.width>600}{this.resized=true;this.style.width=600;}">


这种方法会在调用图片的时候,自动按比例缩小到指定的宽度,不会引起图片的变形,并且也不会撑破表格,但是缺点是,如果图片太大,在图片下载过程中,也就是图片显示过程中,会先以图片原大小显示,这时就会撑破表格,页面很难看,二当图片完全显示后,图片又会自动缩小。

三、我们可以针对表格的属性来限制大小防止被撑开,比如在
<table width="600" border="0" cellpadding="0" cellspacing="0">
里添加代码“
style="table-layout:fixed;word-wrap:break-word;word-break;break-all;"
”,其中“table-layout:fixed; ”是为了将表格布局固定住,就可以有效地防止表格被撑开,“
word-wrap:break-word;
”是控制换行的,也就是强制执行换行,这个在文本内容较多的情况下需要使用到,特别是重复的内容出现,不执行换行的话,表格就被撑开了;而“word-break: break-all; ”可以解决IE的框架被英文(非亚洲语言文本行)撑开的问题,但是不会强制换行,只显示表格宽度里的内容。一般情况下只要用到“
style="table-layout:fixed;word-wrap:break-word;"
就可以。当然,上面调用的语句可以定义在css里,比如

table {
table-layout: fixed;
word-wrap:break-word;
}


四、用css控制图片自适应大小,代码如:

img {
max-width: 600px;
width:expression(this.width > 600 ? "600px" : this.width);
overflow:hidden;
}
其中 max-width:600px; 在IE7、FireFox等其他非IE浏览器下最大宽度为600px,但在IE6中无效;width:600px; 在所有浏览器中图片的大小为600px,当图片大小大于600px,自动缩小为600px,在IE6中有效;而 overflow:hidden;   指将超出设置大小的部分隐藏,避免控制图片大小失败而引起的表格撑开变形。

五、最后总结一下最实用的代码:
如果是表格,请用:

table {
table-layout: fixed;
word-break: break-all;
}
如果是div层,请用:

div {
table-layout: fixed;
word-wrap: break-word;
width: 加上宽度;
overflow: hidden;     (让多出来的不显示。)  
}

测试 不指定

admin , 2009/11/03 11:13 , 电脑技术 , 评论(0) , 阅读(462) , Via 本站原创
dfdffd
Tags: ,
分页: 1/22 第一页 1 2 3 4 5 6 7 8 9 10 下页 最后页 [ 显示模式: 摘要 | 列表 ]