Home Web Front-end JS Tutorial js lower right corner and floating ad code (compatible with multiple browsers)_advertising code

js lower right corner and floating ad code (compatible with multiple browsers)_advertising code

May 16, 2016 pm 06:16 PM
lower right corner

ie6 7 8
ff3.5 3.6
chrome 4.1.2
safari

The main code is as follows:


[Ctrl A select all Note: If you need to introduce external Js, you need to refresh to execute
]<script> function scrollx(p){ var d = document,dd = d.documentElement,db = d.body,w = window,o = d.getElementById(p.id),ie6 = /msie 6/i.test(navigator.userAgent),style,timer; if(o){ o.style.cssText +=";position:"+(p.f&&!ie6?'fixed':'absolute')+";"+(p.l==undefined?'right:0;':'left:'+p.l+'px;')+(p.t!=undefined?'top:'+p.t+'px':'bottom:0'); if(p.f&&ie6){ o.style.cssText +=';left:expression(documentElement.scrollLeft + '+(p.l==undefined?dd.clientWidth-o.offsetWidth:p.l)+' + "px");top:expression(documentElement.scrollTop +'+(p.t==undefined?dd.clientHeight-o.offsetHeight:p.t)+'+ "px" );'; dd.style.cssText +=';background-image: url(about:blank);background-attachment:fixed;'; }else{ if(!p.f){ w.onresize = w.onscroll = function(){ clearInterval(timer); timer = setInterval(function(){ //双选择为了修复chrome 下xhtml解析时dd.scrollTop为 0 var st = (dd.scrollTop||db.scrollTop),c; c = st - o.offsetTop + (p.t!=undefined?p.t:(w.innerHeight||dd.clientHeight)-o.offsetHeight); if(c!=0){ o.style.top = o.offsetTop + Math.ceil(Math.abs(c)/10)*(c<0?-1:1) + 'px'; }else{ clearInterval(timer); } },10) } } } } } scrollx({ id:'aa' }) scrollx({ id:'bb', l:0, t:200, f:1 }) /* id 你要滚动的内容的id l 横坐标的位置 不写为紧贴右边 t 你要放在页面的那个位置默认是贴着底边 0是贴着顶边 f 1表示固定 不写或者0表示滚动 */ </script>
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to remove the evaluation copy watermark in the lower right corner of win11 24H2? Tips for removing the evaluation copy in the lower right corner of win11 How to remove the evaluation copy watermark in the lower right corner of win11 24H2? Tips for removing the evaluation copy in the lower right corner of win11 Jun 01, 2024 pm 09:52 PM

How to remove the evaluation copy text in the lower right corner of win1124H2? When we use the system, sometimes the desktop will display a transparent watermark on the lower right corner of the screen. So how do we remove this transparent watermark? Users can directly use third-party software to operate. Let this site carefully introduce to users how to remove the watermark on the win1124H2 evaluation copy. To remove the watermark on the win1124H2 evaluation copy, download the UniversalWatermarkDisabler tool. After running it, the current system version and watermark status will be displayed. If "Ready for installation" is displayed in "Status", it can be removed.

What should I do if the icon in the lower right corner of win11 does not respond when I click it? What should I do if the icon in the lower right corner of win11 does not respond when I click it? Jun 29, 2023 pm 01:54 PM

What should I do if the icon in the lower right corner of win11 does not respond when I click it? The shortcut icon for the currently running task can be displayed in the lower right corner of the computer. Just click on the icon to continue running the task, which is very convenient. However, many users find that the task icon shortcut key in the lower right corner of the win11 system does not respond after clicking it. What is going on? Today, the editor will give you a tutorial on how to solve the problem of clicking the shortcut in the lower right corner of win11. Users in need should quickly take a look. What should I do if the icon in the lower right corner of win11 does not respond? 1. First, press the "win" button on the keyboard, and then click "Settings". 2. Then click "About" under system settings. 3. Then find the blue font "Advanced system settings" under the device specifications.

How to display all icons in the lower right corner of win11 How to display all icons in the lower right corner of win11 Jan 12, 2024 pm 06:33 PM

After updating the new system, there will always be some big and small problems. Many users have reported that the icons in the lower right corner are gone, so we have brought you a tutorial on how to display all the icons in the lower right corner of win11. If you If you have similar problems, let’s see how to solve them. Why do all the icons in the lower right corner of win11 appear? 1. First, right-click the taskbar and click "Properties" below. 2. After entering properties, you can enter the taskbar options, then you can see "Notification Area" and click "Customize" behind it. 3. Then you can enter the notification area and select "Notifications and Actions". 4. At this time, you can find "Select which icons to display on the taskbar" in the notification operation, and turn on all the subsequent switches to display them all.

How to turn off the weather in the lower right corner of WIN10 How to turn off the weather in the lower right corner of WIN10 Feb 18, 2024 pm 01:38 PM

The function of displaying weather in the lower right corner of the WIN10 operating system is implemented by the weather application that comes with the system. If you do not want to display the weather in the lower right corner of the taskbar, you can turn it off through the following methods. Method 1: Close through the settings menu. Click the start menu and select the "Settings" icon (gear-shaped icon). In the settings window, select the "Personalize" option. In the menu on the left side of the personalization window, select Taskbar. On the right side of the taskbar settings window, find the "System Icons" area and click "Show or hide system icons on the taskbar.

How to permanently turn off the weather in the lower right corner of win10 How to permanently turn off the weather in the lower right corner of win10 Feb 21, 2024 pm 11:57 PM

Win10 is an operating system released by Microsoft. The weather widget in the lower right corner of the desktop allows users to understand the current weather conditions at any time. However, some users may not be interested in this gadget or feel that it takes up too much desktop space and would like to be able to turn it off permanently. This article will introduce how to turn off the weather widget in the lower right corner of Win10. The first method is to turn off the weather widget in the lower right corner by setting app notifications. First, we click on the notification icon in the lower right corner of the taskbar, and then select the "All Settings" option

Steps to turn off the weather in the lower right corner of Win10 Steps to turn off the weather in the lower right corner of Win10 Jan 05, 2024 pm 01:21 PM

In the latest update, the win10 system has added an information and interest option in the lower right corner for users, where users can see weather, news, stories, etc. However, some users express that they are not used to this new interface, so we can turn it off directly. Let’s take a look at it together. How to turn off the weather in the lower right corner of win10 1. First, click on the blank space on the lower taskbar. 2. Move the mouse up to "Information and Interests", you can see "Close" on the right, click it.

Unable to access the Internet: a red x is displayed in the lower right corner of win7 Unable to access the Internet: a red x is displayed in the lower right corner of win7 Dec 25, 2023 pm 05:25 PM

Recently, many friends have encountered the problem of being unable to access the Internet with the red x in the lower right corner of win7! Today, the editor will bring you the solution to the problem of Win7 computer network red cross not being able to access the Internet. Let’s take a look at it. Solution to the problem of not being able to access the Internet with a red Where does an exclamation mark or a red cross appear? If there is one, place the mouse on it and click it; wait for the computer's automatic diagnosis to complete and then try to reconnect to the network. Ignore the prompts after the diagnosis and directly Just close it. Method 2: 1. If it still doesn’t work, check whether your IP has been changed.

The triangle number in the lower right corner of the computer is missing The triangle number in the lower right corner of the computer is missing Feb 13, 2024 am 08:18 AM

After buying a laptop, many people find that their computer configuration is quite high, but why does it play so lag? Or they feel that they bought a fake laptop. Why can other people play smoothly but not mine? In fact, , this is not the case, let’s see the editor explain in detail! First: The laptop does not turn on the high-performance mode. Generally, there is a battery icon in the lower right corner of the laptop. If not, please click on the inverted triangle. If it is still not found, open the Start menu and select Control Panel. In Win10 system, you can directly enter "Control Panel" in the search bar in the lower right corner, and then find the power options in the control panel. After opening it, you will find two options, usually balance and energy saving. If you observe carefully, you will find that there is an additional hidden plan, click

See all articles