1
2
3
4
<!--飘窗-->
<div id="roll">
      <img src="img/roll.jpg">
</div>

  

#roll {
    height: 200px;
    position: fixed; /*fixed实现绝对定位*/
    cursor:pointer;
}
#roll img{
    height: 200px;
}

  

<script type="text/javascript">
        var ggRoll = {                                     //创建对象直接量
            roll: document.getElementById("roll"),          //获取id属性为roll的对象
            speed: 20,                                      //飘动速度,即为定时器函数多长时间执行一次
            statusX: 1,                                     //规定每执行一次函数,left属性值变化的幅度
            statusY: 1,                                     //规定每执行一次函数,top属性值变化的幅度
            x: 100,                                         //规定初始状态下left属性的值
            y: 300,                                         //规定初始状态下top属性的值
            //差值用来测算left属性值的极限
            winW: document.documentElement.clientWidth - document.getElementById("roll").offsetWidth,
            //差值用来测算top属性值的极限
            winH: document.documentElement.clientHeight - document.getElementById("roll").offsetHeight,
            //声明函数
            Go: function () {
                //设置div的left属性值
                this.roll.style.left = this.x + 'px';
                //设置div的top属性值
                this.roll.style.top = this.y + 'px';
                //如果statusX=1则每次减少1px,否则减少1px
                this.x = this.x + (this.statusX ? -1 : 1)
                //如果left属性值小于0,也就是div要超出左边界了,就将statusX设置为0
                if (this.x < 0) { this.statusX = 0 }
                //如果top属性值大于winW,也就是div要超出右边界了,就将statusX设置为1
                if (this.x > this.winW) { this.statusX = 1 }
 
                this.y = this.y + (this.statusY ? -1 : 1)
                if (this.y < 0) { this.statusY = 0 }
                if (this.y > this.winH) { this.statusY = 1 }
 
            }
        };
        var interval = setInterval("ggRoll.Go()", ggRoll.speed);
        ggRoll.roll.onmouseover = function () { clearInterval(interval) };                     //onmouseover属性:鼠标移动到元素上时触发
        ggRoll.roll.onmouseout = function () { interval = setInterval("ggRoll.Go()", ggRoll.speed) };//onmouseout属性:鼠标离开元素时触发
    </script>

  

posted @ 2022-06-10 15:31 二姐1511 阅读(400) 评论(0) 推荐(1) 编辑
摘要: 1、到Navicat官网下载使用版本进行安装,具体操作不再详述。Navcat官网下载链接:http://www.navicat.com.cn/download/navicat-premium ; 2、到GitHub下载DoubleLabyrinth大神发布的Navicat Keygen,具体操作不再 阅读全文
posted @ 2022-03-14 14:23 二姐1511 阅读(1241) 评论(0) 推荐(0) 编辑
摘要: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://xxx' is therefore not allowed access ASP.net Core 跨域有两种,全 阅读全文
posted @ 2022-02-12 11:26 二姐1511 阅读(666) 评论(0) 推荐(0) 编辑
摘要: 默认情况下,IIS拒绝PUT和Delete请求,原因为IIS默认注册了一个名为"WebDAVModule"的自定义HttpModule导致的,WebDAV的全称为"Web-based Distributed Authoring and Versioning",它是一个在多用户之间辅助协同编辑和管理在 阅读全文
posted @ 2022-01-05 16:27 二姐1511 阅读(302) 评论(0) 推荐(0) 编辑
摘要: 通过js实现在图片上打点,以下按jquery方式和js的方式实现,支持按容器比例定位标记点。 方式一jquery: <html lang="en"> <head> <meta charset="UTF-8"> <title>测试图片打点</title> <meta name="viewport" c 阅读全文
posted @ 2021-12-22 16:13 二姐1511 阅读(788) 评论(0) 推荐(0) 编辑
摘要: 本方案是针对Windows server+IIS7 +asp.net core 2.1的部署方案。当然asp.net core项目一样可部署到其它OS上,还有Durck或Azure 或OpsDev上。如果Linux上,通过Kestrel代理,如果应用使用 Kestrel 服务器,Nginx、Apac 阅读全文
posted @ 2021-11-26 21:08 二姐1511 阅读(2494) 评论(0) 推荐(0) 编辑
摘要: 本教程主要是对 网站http重定向到https,其中包括目前市面上常用各种服务器环境(Apache,Ngnix,IIS7系列)设置方法。 第一“IIS7” 环境中的设置方法1.下载安装IIS的URL重写模块:Microsoft URL Rewrite Module 2.安装完毕 在Internet服 阅读全文
posted @ 2021-08-16 18:12 二姐1511 阅读(1275) 评论(0) 推荐(0) 编辑
摘要: 数据库远程连接的时报错: 要解决这个问题,首先需要检查SqlServer 的几项设置。(这些设置一般都是系统默认项,不过最好看一下) (一)检查SQL Server是否允许远程链接。以SqlServer 身份验证方式登陆。登录账户sa (二)打开配置管理器,检查微软SQL服务器(MSSQLServe 阅读全文
posted @ 2021-03-02 17:59 二姐1511 阅读(624) 评论(0) 推荐(0) 编辑
摘要: 1 void Main() 2 { 3 using (ServerManager serverManager = new ServerManager()) 4 { 5 var config = serverManager.GetWebConfiguration("SGSM"); 6 Configur 阅读全文
posted @ 2021-01-08 15:02 二姐1511 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 单行文本 width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 多行文本 display: -webkit-box; width: 200px; overflow: hidden; -webkit- 阅读全文
posted @ 2020-12-24 18:38 二姐1511 阅读(95) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示