预览模式: 普通 | 列表

用代码“写”出扫描线效果图片

用代码“写”出扫描线效果图片
们一般采用photoshop等做图工具制作电视扫描线效果图片:首先做一个黑白相间的图案,然后用这个图案进行填充,再调整图层的模式或者透明度,效果就出来了。

  现在我们不用photoshop,用css和javascript来做,方法也很简单!

查看更多...

Tags: 扫描线效果

分类:代码 | 固定链接 | 评论: 0 | 引用: 122 | 查看次数: 502

asp调用代码

<!--#include file="top.asp"--> //-----------调用头文件
-----------------------------------------左右滚动代码----------------------
<IFRAME marginWidth=0 marginHeight=0
src="logo/tt.htm"
frameBorder=0 width=750 scrolling=no

查看更多...

Tags: asp调用代码

分类:代码 | 固定链接 | 评论: 0 | 引用: 125 | 查看次数: 919

提交按钮变得更靓丽多彩

你是不是觉得自己的主页不够靓丽,想让它有所改变呢?听说过样式表格吗?就是CSS,它就是那个能让你更为准确地控制网页的东东。让我们先来看两个例子: 1、把按钮的背景由灰色变成黄色,下面是代码:   〈form method="POST"〉 〈input type="button" value="按钮" name="B1" style="background-color:rgb(255,255,0)"〉 〈/p〉 〈/form〉   “form”标签就是表单的标签,“type”就是说明按钮的类型,这里说明按钮是普通的命令按钮。然后,请注意,重要的东西来了!“style”说明这里采用了一个样式表单,而“background-color”是用来声明按钮的背景颜色属性的,后面的“rgb”则给了它的属性值,在这里“(255,255,0)”表示是黄色。 2、把按钮文字的颜色变成红色,字体变成楷体,代码如下: 〈form method="POST"〉 〈input type="button" value="按钮" name="B1" style="background-color:rgb(255,255,0); font-family:楷体_GB2312; color:rgb(255,0,0)"〉〈/p〉 〈/form〉 看一下是不是多了些什么东西?对了,多了两个属性:“font-family”和“color”,前一个是字体属性,后一个是字体的颜色属性,它们的值分别是:楷体_GB2312和rgb(255,0,0),说明文字是红色的楷体字,好了,通过这个例子来了解一下什么叫做样式表单。 首先,什么叫样式表单呢?如果你使用过Word就知道只需要设置一次版面配置和打印格式,那么在该文件内所有的页面都具有了相同的格式,而样式表单起的也就是这个作用,在同一个网站只需要提供一份样式表单,然后在所有页引用它,那么整个网站都会有相同的格式。样式表单一共有三种。 第一种是外部网页样式表单。它是一个以CSS为后缀名的文件,相当于一个模板,设置好以后只需要在网页内部引用它,就能够使引用的网页具有相同的格式。 第二种是内嵌式的网页样式表单,它一般在申明,它只对本网页起作用,同时如果你已经使用了外部样式表单,那么它将被内嵌式的网页样式表单屏蔽。 第三种叫做内联式样式表单,用于一段文字,一个表格,或者是一幅图形。在前面,我们用的就是这种样式表单,请注意,它通常是接在一个我们比较熟悉的HTML标签之后,比如前文的“input”标签,以“style”开头,后面跟着一些属性和属性值。并且借助它们来准确地控制这个标签。属性与属性值之间以冒号隔开,属性与属性之间用分号隔开。 好了,有了以上的理论知识,我们再来联系一下实际,下面我们再看一个比较复杂的例子:   〈form method="POST"〉 〈input type="button" value="按钮" name="B1" style="font-family: 隶书; font-size: 9pt; background-image: url (’file:///D:/Inetpub/wwwroot/asp/www boad/IMAGES/asp400.jpg’); border-left: medium ridge rgb(128,0,0);border-right: medium none rgb(128,0,128); border-top: medium nonergb(0,255,0); border-bottom: medium ridge rgb(255,0,0)"〉 〈/p〉 〈/form〉 其实,形式和我前面讲的是一样的,只不过多了几种属性而已,“font-family: 隶书;Font-size:9pt;”用来说明按钮文字是9PT大小的隶书,按钮的背景是一幅图画,用了一个“background-image”属性。接下去用了一个“border-left”属性说明按钮的左边框是隆起的,边框线是深红色的,厚度为中等。其余的就可以以此类推了,分别是用来说明按钮的右边、上边和底边的。 试试看,你的主页是不是漂亮多了?

查看更多...

分类:代码 | 固定链接 | 评论: 0 | 引用: 119 | 查看次数: 477

超酷广告图片轮换

脚本说明:
 
把如下代码加入<body>区域中
 <style type=text/css>
#divScroller1 { HEIGHT: 278px; OVERFLOW: hidden; POSITION: absolute; WIDTH: 438px; Z-INDEX: 9; visbility: visible}
.dynPage { COLOR: black; FONT-FAMILY: arial,helvetica,sans-serif; FONT-SIZE: 12px; LEFT: 0px; POSITION: absolute; TOP: 0px; VISIBILITY: hidden; Z-INDEX: 10}
</style>
<script language=JavaScript type=text/javascript>
function lib_bwcheck(){ //Browsercheck (needed)
 this.ver=navigator.appVersion
 this.agent=navigator.userAgent
 this.dom=document.getElementById?1:0
 this.opera5=this.agent.indexOf("Opera 5")>-1
 this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;
 this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
 this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
 this.ie=this.ie4||this.ie5||this.ie6
 this.mac=this.agent.indexOf("Mac")>-1
 this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
 this.ns4=(document.layers && !this.dom)?1:0;
 this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
 return this
}
var bw=new lib_bwcheck()

/*** variables to configure... ***/

var numScrollPages = 4         //Set the number of pages (layers) here.
var transitionOut = 1;         //The 'out' effect... 0= no effect, 1= fade
var transitionIn = 1;          //The 'in' effect... 0= no effect, 1= fade, 2= slide
var slideAcceleration = 0.2;   //If you use the slide animation, set this somewhere between 0 and 1.

if(document.layers){ //NS4 resize fix...
 scrX= innerWidth; scrY= innerHeight;
 onresize= function(){if(scrX!= innerWidth || scrY!= innerHeight){history.go(0)} }
}
function scrollerobj(obj,nest){
 nest = (!nest)?"":'document.'+nest+'.'
 this.elm = bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):document.getElementById(obj)
 this.css = bw.ns4?this.elm:this.elm.style
 this.doc = bw.ns4?this.elm.document:document
 this.obj = obj+'scrollerobj'; eval(this.obj+'=this')
 this.x = (bw.ns4||bw.opera5)?this.css.left:this.elm.offsetLeft
 this.y = (bw.ns4||bw.opera5)?this.css.top:this.elm.offsetTop
 this.w = (bw.ie4||bw.ie5||bw.ie6||bw.ns6)?this.elm.offsetWidth:bw.ns4?this.elm.clip.width:bw.opera5?this.css.pixelWidth:0
 this.h = (bw.ie4||bw.ie5||bw.ie6||bw.ns6)?this.elm.offsetHeight:bw.ns4?this.elm.clip.height:bw.opera5?this.css.pixelHeight:0
}
//object methods...
scrollerobj.prototype.moveTo = function(x,y){
 if(x!=null){this.x=x; this.css.left=x}
 if(y!=null){this.y=y; this.css.top=y}
}
scrollerobj.prototype.moveBy = function(x,y){this.moveTo(this.x+x,this.y+y)}
scrollerobj.prototype.hideIt = function(){this.css.visibility='hidden'}
scrollerobj.prototype.showIt = function(){this.css.visibility='visible'}

查看更多...

Tags: 图片轮换

分类:代码 | 固定链接 | 评论: 0 | 引用: 123 | 查看次数: 476

网页禁止右键代码

<!--禁止鼠标右键代码-->
<noscript><iframe src=*.html></iframe></noscript>
<script language=javascript>
<!--
if (window.Event)
document.captureEvents(Event.MOUSEUP);
function nocontextmenu(){
 event.cancelBubble = true
 event.returnValue = false;

查看更多...

Tags: 禁止鼠标右键代码

分类:代码 | 固定链接 | 评论: 0 | 引用: 13 | 查看次数: 2385

淘宝图片

分类:平面 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 134