【css实现盒子模型详细讲解】教程文章相关的互联网学习教程文章

iphone手机桌面滑动效果使用css3实现_其他特效

iphone手机桌面效果,因为用了css3样式,只测试了谷歌浏览器。 iphone手机桌面效果 body,div,ul,li{padding: 0; margin: 0; } li{list-style: none; } body {background: #333; } #iphone {width: 900px; height: 600px; background: url(http://files.jb51.net/file_images/article/201212/mobilhdmenu/bg.jpg); position: absolute; top: 50%; left: 50%; margin: -300px 0 0 -450px; } #wrap {width: 240px; height: 360px...

CSS定义Hover实现文字变大的超级链接_链接特效

强调连接 [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]

JS判断不同分辨率调用不同的CSS样式文件实现思路及测试代码_javascript技巧【图】

最近看一个网站,发现显示器不同的分辨率,样式文件调用的也不一样,今天写了一个例子研究一下, 代码如下: 无标题文档 window.onload=function(){ var sc=document.getElementById("sc"); var d=document.getElementById("d"); if(screen.width>1024) //获取屏幕的的宽度 { sc.setAttribute("href","css/c2.css"); //设置css引入样式表的路径 d.innerHTML = "你的电脑屏幕宽度大于1024,我的宽度是 1200px, 背景色现在是红...

js+html+css实现鼠标移动div实例_javascript技巧

js: 代码如下: var posX; var posY; fdiv = document.getElementById("divBody"); document.getElementById("divHead").onmousedown=function(e) { if(!e) e = window.event; //IE posX = e.clientX - parseInt(fdiv.style.left); posY = e.clientY - parseInt(fdiv.style.top); document.onmousemove = mousemove; } document.onmouseup = function() { document.onmousemove = null; } function mousemove(ev) { if(ev==null) ...

JS+CSS制作DIV层可(最小化/拖拽/排序)功能实现代码_javascript技巧

代码如下: JS+CSS制作的DIV层最小化和随意拖拽排序功能 body { margin:10px; } #dragHelper { position:absolute;/*重要*/ border:2px dashed #000000; background-color:#FFFFFF; filter: alpha(opacity=30); } .normal { position:absolute;/*重要*/ width:300px; #height:10px; border:1px solid #666666; background-color:#FFFFFF; } .over { position:absolute;/*重要*/ width:300px; #height:10px; border:1px solid #66...

jQuery+css实现图片滚动效果(附源码)_jquery【图】

源码下载bxCarousel参数说明: move:每次滚动移动图片的数量,默认为4。 display_num:展示图片的数量,默认为4。 speed:图片滚动速度,默认为500毫秒。 margin:图片间的间距,默认为0。 auto:是否自动滚动,默认为false。 auto_interval:当设为自动滚动时,每次滚动的时间间隔(毫秒),默认为2000毫秒即2秒。 auto_dir:自动滚动的方向,默认为next,你可以试下prev。 next_image:向右滚方向按钮图片,可以用CSS设置。 pre...

DIV+CSS+JS不间断横向滚动实现代码_javascript技巧【图】

DIV+CSS+JS实现不间断横向滚动代码 代码如下: 横向不间断滚动DIV CSS代码-DIVCSS5 .scroll_div {width:600px; height:49px;margin:0 auto; overflow: hidden; white-space: nowrap; background:#ffffff;} .scroll_div img {width:120px;height:49px;border: 0;margin: auto 8px; } #scroll_begin, #scroll_end, #scroll_begin ul, #scroll_end ul, #scroll_begin ul li, #scroll_end ul li{display:inline;}/* 设置ul和li横...

jQuery+CSS实现菜单滑动伸展收缩(仿淘宝)_jquery【图】

功能很实用,代码非常的简单 效果1. 效果2. 样式代码如下: 代码如下: body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,br,pre,form,fieldset,input,textarea,p,blockquote,th,td{ margin:0; padding:0 } span{ color:#FF2B13 } a{ text-decoration:none; color:#515050 } a:hover{ text-decoration:underline; color:red } .box_all{ overflow:hidden; width:350px; font-family:"微软雅黑"; font-size:14px; border:1px solid #E...

jQuery+css+html实现页面遮罩弹出框_jquery【图】

页面遮罩弹出框是最常见的一种情况,今天用jQuery实现页面遮罩弹出框,主要用的技术有JQuery,css和html, html代码如下: 代码如下:点击这里查看效果 关闭 正在加载,请稍后.... css代码如下: 代码如下:body { font-family:Arial, Helvetica, sans-serif; font-size:12px; margin:0; } #main { height:1800px; padding-top:90px; text-align:center; } #fullbg { background-color:gray; left:0; opacity:0.5; position:absol...

html+css+js实现xpwindow界面及有关功能_javascript技巧【图】

注意: 该程序在IE调试的,其他浏览器可能有BUG,见谅! 代码如下: Insert title here -- CSS -- set window style -- JavaScript -- set function alert("XP Window以IE测试,其他浏览器可能有BUG请见谅! 基本功能+四边四角顶部拖拉都已实现!") alert("进行操作前,记得先初始化窗口哦!"); /* * create xp window and initialize */ var myW = new MyWindow(); function initialize() { myW.setBackgroundDiv("mywindow"...

csstransform3D幻灯片特效实现步骤解读_javascript技巧【图】

js 代码如下: $(function(){ var length = $(".container a").length; var $items = $(".container a"); $items.on("transitionend", function(event){ $items.removeClass("trans"); }); $(".container a").each(function(index, value){ var $child = $(this); if (index === 0) { $child.addClass("current showing"); } else if (index === 1) { $child.addClass("left showing"); } else if (index == 2) { $child.addClass(...

如何使用jquery动态加载js,css文件实现代码_jquery

使用jquery动态加载js,css文件 代码如下: $.extend({ includePath: , include: function(file) { var files = typeof file == "string" ? [file]:file; for (var i = 0; i < files.length; i++) { var name = files[i].replace(/^\s|\s$/g, ""); var att = name.split(.); var ext = att[att.length - 1].toLowerCase(); var isCSS = ext == "css"; var tag = isCSS ? "link" : "script"; var attr = isCSS ? " type=text/css re...

JS实现标签页效果(配合css)_javascript技巧【图】

实现的效果: 如上图所示为制作的标签页,我们想要实现的效果是当鼠标移到某一个标签的时候,在下面的内容区显示对应的内容,并且相应标签的颜色需要改变,如图中所示当前鼠标的位置在“标签1”上,则内容区域显示的内容为“我是内容1”,并且“标签1”的颜色要比“标签2”和“标签3”深一些,同样鼠标移到“标签2”和“标签3”的时候显示“我是内容2”和“我是内容3”。这样的效果是CSS和JS配合实现的。下面我们就来看看具体代码:...

js实现单一html页面两套css切换代码_javascript技巧【图】

今天研究了一下JS的用setAttribute方法实现一个页面两份样式表的效果,具体方法如下: 第一步:在连接样式表的元素里定义一个id,例如 代码如下: 我定义的id是css。 第二步:写一个js函数,代码如下: 代码如下: function change(a){ var css=document.getElementById(“css”); if (a==1) css.setAttribute(“href”,”1.css”); if (a==2) css.setAttribute(“href”,”2.css”); } 这个函数的code可以放在页面的任何地方。...

jquery+css+ul模拟列表菜单具体实现思路_jquery【图】

代码如下: jquery用ul模拟表单select列表菜单效果 body {padding:10px;} * {margin:0; padding:0; font-size:12px;} ul,li {list-style-type:none;} .select_box {width:150px; border:1px solid #ccc; padding-right:20px; padding-left:10px; background:url(107.gif) no-repeat 160px center; position:relative;} .select_box span {cursor:pointer; display:block; line-height:25px; width:100%; height:25px; overflo...