search
HomeWeb Front-endJS TutorialjQuery-Tools-overlay usage introduction_jquery

复制代码 代码如下:




jQuery Tools standalone demo



href="./overlay-basic.css"/>




jQuery-Tools-overlay usage introduction_jquery
jQuery-Tools-overlay usage introduction_jquery



jQuery-Tools-overlay usage introduction_jquery

The Barcelona Pavilion


Barcelona, Spain



The Barcelona Pavilion, designed by Ludwig Mies van der Rohe,
was the German Pavilion for the 1929 International Exposition in
Barcelona, Spain. It was an important building in the history of
modern architecture.



Several critics, historians and modernists have declared it "the
most beautiful building of the century"





jQuery-Tools-overlay usage introduction_jquery

The Barcelona Pavilion


Barcelona, Spain



Another unique feature of this building is the exotic
materials Mies chose to use
.



Plates of high-grade stone materials like veneers of Tinos verde
antico marble and golden onyx as well as tinted glass of grey,
green, white, in addition to translucent glass, perform
exclusively as spatial dividers.




<script> <BR>$(document).ready(function() { <BR>$("img[rel]").overlay({ <BR>closeOnClick:false, <BR>mask: 'darkred' <BR>}); <BR>}); <BR></script>



CSS
复制代码 代码如下:

/* the overlayed element */
.simple_overlay {
/* must be initially hidden */
display:none;
/* place overlay on top of other elements */
z-index:10000;
/* styling */
background-color:#333;
width:675px;
min-height:200px;
border:1px solid #666;
/* CSS3 styling for latest browsers */
-moz-box-shadow:0 0 90px 5px #000;
-webkit-box-shadow: 0 0 90px #000;
}
/* close button positioned on upper right corner */
.simple_overlay .close {
background-image:url(./close.png);
position:absolute;
right:-15px;
top:-15px;
cursor:pointer;
height:35px;
width:35px;
}

关闭的css的命名: xxx .close

以下列出的是所有可用的属性选项:
属性 默认值 描述
close   一个jQuery选择器内结束元素 叠加。 这些可以是任何元素,例如链接、按钮或 图像。 如果这不是提供的、亲密的元素 自动生成的。 阅读更多关于此 在 定义关闭行动
closeOnClick <span id="OUTFOX_JTR_TRANS_NODE-67" class="OUTFOX_JTR_TRANS_NODE">true </span> 默认情况下,重叠是当鼠标关闭或者 点击区域外。  适合 模态 对话框
closeOnEsc <span id="OUTFOX_JTR_TRANS_NODE-76" class="OUTFOX_JTR_TRANS_NODE">true </span> 默认情况下,覆盖网络时关闭键盘ESC键
effect <span id="OUTFOX_JTR_TRANS_NODE-81" class="OUTFOX_JTR_TRANS_NODE"><span>'default'</span> </span>

效果时要使用打开包裹, 关闭。 这可以戏剧性地改变的行为 叠加。 默认情况下这个工具使用一种叫做'default'的影响 这是一个简单的显示/隐藏效果。

以下列出的是现在 可用 效果 你也可以 做你自己的 效果

fixed <span id="OUTFOX_JTR_TRANS_NODE-89" class="OUTFOX_JTR_TRANS_NODE"><span>true</span></span> 自从1.2.0 。 保持在相同的是否覆盖 位置,而屏幕滚动。 这是默认 适合所有浏览器的行为除了IE6和下面。 IE6不 支持固定位置。 如果这个属性设置 false 然后是定位在覆盖的 关系到文档,以便在屏幕上滚动 然后叠加与文档一起移动。
mask   之前被称为 暴露 。 覆盖很 经常配合使用 这个 面具工具 。 因为 这样,支持这个特性已经内嵌式 工具。 这个选项接受 这个 面具 配置 。 这不是一个简单的字符串指定 面具的背景颜色或更复杂的对象文字 指定更多的配置变量。

看到的一个例子 叠加 连同面具 。 默认情况下屏蔽是禁用的。

left "center" 指定多远从左边的屏幕的边缘了 叠加应放置。 默认情况下,横向包裹 集中值为"center",但你也可以提供一个 数值指定的距离以像素为单位。
load false 自从1.2.0 。 如果启用了然后覆盖的负载 后立即被初始化。
oneInstance <span id="OUTFOX_JTR_TRANS_NODE-113" class="OUTFOX_JTR_TRANS_NODE">true</span> 默认情况下,只可以有一个叠加在页面。 将这个属性设置为 允许您 有 多个 叠加实例
speed 'normal' 淡入的速度动画的'normal' 效果。 有效值是 'slow', 'normal' 和 'fast',或者你也可以 提供一个数值(以毫秒为单位)。 通过设置这个 属性为0,则会出现滚动立即没有任何 动画。
target   日程表的元素中指定的(如果不是 这个 rel 属性的触发元素)。
top '10%' 指定如何远离屏幕的顶部边缘的叠加 应放置。 可接受的值是一个整数 指定一个距离(以像素为单位),一个字符串(如“15%”) 指定百分比值或“中心”在这种情况下 叠加是垂直居中。 百分数工作 一直保持在不同的屏幕分辨率。

事件
确保你已经阅读 大约 事件 jQuery工具 。 所有事件监听器接收 这个 事件 对象 作为第一个参数并没有其他参数 为叠加。
事件 什么时候发生的?
onBeforeLoad 叠加显示之前。 叠加已经 定位在该位置将从那里开始动画。
onload 当叠加已经完全被显示
onBeforeClose 关闭之前的叠加
onClose 当叠加是关闭的
Scripting API
First make sure you understand yourself with the jQuery scripting tool. Listed below are all available API methods:
方法 返回值类型 描述
close() Overlay 关闭叠加。
getClosers() <span id="OUTFOX_JTR_TRANS_NODE-157" class="OUTFOX_JTR_TRANS_NODE">jQuery </span> 返回结束元素(s)作为一个jQuery对象。
getConf() <span id="OUTFOX_JTR_TRANS_NODE-160" class="OUTFOX_JTR_TRANS_NODE">对象 </span> 将配置为叠加。
getOverlay() <span id="OUTFOX_JTR_TRANS_NODE-163" class="OUTFOX_JTR_TRANS_NODE">jQuery </span> 返回元素作为一个jQuery对象日程表。
getTrigger() <span id="OUTFOX_JTR_TRANS_NODE-166" class="OUTFOX_JTR_TRANS_NODE">jQuery </span> 返回元素作为一个jQuery对象触发。
isOpened() boolean 返回 真正的 如果打开包裹。
load() Overlay 打开叠加。  
I will update the time tomorrow and draw a sentence for this.

Tab: Portal
Tab (slideshow): Portal
Tooltip: Portal
Overlay: Portal
Dateinput: Portal
Working on framework 2 on Ctrip .0, but what I was studying was framework 4.0. What were I thinking at the time? T.T. It’s all old TMD technology and piles of code
Statement
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
JavaScript's Role: Making the Web Interactive and DynamicJavaScript's Role: Making the Web Interactive and DynamicApr 24, 2025 am 12:12 AM

JavaScript is at the heart of modern websites because it enhances the interactivity and dynamicity of web pages. 1) It allows to change content without refreshing the page, 2) manipulate web pages through DOMAPI, 3) support complex interactive effects such as animation and drag-and-drop, 4) optimize performance and best practices to improve user experience.

C   and JavaScript: The Connection ExplainedC and JavaScript: The Connection ExplainedApr 23, 2025 am 12:07 AM

C and JavaScript achieve interoperability through WebAssembly. 1) C code is compiled into WebAssembly module and introduced into JavaScript environment to enhance computing power. 2) In game development, C handles physics engines and graphics rendering, and JavaScript is responsible for game logic and user interface.

From Websites to Apps: The Diverse Applications of JavaScriptFrom Websites to Apps: The Diverse Applications of JavaScriptApr 22, 2025 am 12:02 AM

JavaScript is widely used in websites, mobile applications, desktop applications and server-side programming. 1) In website development, JavaScript operates DOM together with HTML and CSS to achieve dynamic effects and supports frameworks such as jQuery and React. 2) Through ReactNative and Ionic, JavaScript is used to develop cross-platform mobile applications. 3) The Electron framework enables JavaScript to build desktop applications. 4) Node.js allows JavaScript to run on the server side and supports high concurrent requests.

Python vs. JavaScript: Use Cases and Applications ComparedPython vs. JavaScript: Use Cases and Applications ComparedApr 21, 2025 am 12:01 AM

Python is more suitable for data science and automation, while JavaScript is more suitable for front-end and full-stack development. 1. Python performs well in data science and machine learning, using libraries such as NumPy and Pandas for data processing and modeling. 2. Python is concise and efficient in automation and scripting. 3. JavaScript is indispensable in front-end development and is used to build dynamic web pages and single-page applications. 4. JavaScript plays a role in back-end development through Node.js and supports full-stack development.

The Role of C/C   in JavaScript Interpreters and CompilersThe Role of C/C in JavaScript Interpreters and CompilersApr 20, 2025 am 12:01 AM

C and C play a vital role in the JavaScript engine, mainly used to implement interpreters and JIT compilers. 1) C is used to parse JavaScript source code and generate an abstract syntax tree. 2) C is responsible for generating and executing bytecode. 3) C implements the JIT compiler, optimizes and compiles hot-spot code at runtime, and significantly improves the execution efficiency of JavaScript.

JavaScript in Action: Real-World Examples and ProjectsJavaScript in Action: Real-World Examples and ProjectsApr 19, 2025 am 12:13 AM

JavaScript's application in the real world includes front-end and back-end development. 1) Display front-end applications by building a TODO list application, involving DOM operations and event processing. 2) Build RESTfulAPI through Node.js and Express to demonstrate back-end applications.

JavaScript and the Web: Core Functionality and Use CasesJavaScript and the Web: Core Functionality and Use CasesApr 18, 2025 am 12:19 AM

The main uses of JavaScript in web development include client interaction, form verification and asynchronous communication. 1) Dynamic content update and user interaction through DOM operations; 2) Client verification is carried out before the user submits data to improve the user experience; 3) Refreshless communication with the server is achieved through AJAX technology.

Understanding the JavaScript Engine: Implementation DetailsUnderstanding the JavaScript Engine: Implementation DetailsApr 17, 2025 am 12:05 AM

Understanding how JavaScript engine works internally is important to developers because it helps write more efficient code and understand performance bottlenecks and optimization strategies. 1) The engine's workflow includes three stages: parsing, compiling and execution; 2) During the execution process, the engine will perform dynamic optimization, such as inline cache and hidden classes; 3) Best practices include avoiding global variables, optimizing loops, using const and lets, and avoiding excessive use of closures.

See all articles

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

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment