我想要一个如图所示的对联式广告代码,可单独关闭,跟随网页上下浮动,
回复讨论(解决方案)
自己百度一下
自己百度一下
我百度了好么,找到的没那么好用,要么是两个一起关的,要么是关闭之后有问题的
如果你找到两边一起关的,别的代码可以看不懂,但改成一边关的代码还是不难的。无非就是对onClick修改一下监听的方式嘛
譬如:
两幅对联的HTML如下:
<div class="duilian duilian_left"> <div class="duilian_con">对联的内容</div> <a href="#" class="duilian_close">X关闭</a> </div> <div class="duilian duilian_right"> <div class="duilian_con">对联的内容</div> <a href="#" class="duilian_close">X关闭</a> </div>
同时监听两边关闭的JS代码如下:
duilian_close.click(function(){ $(this).parent().hide(); return false; });
可以将对称的X关闭各加上一个ID区分一下
X关闭
X关闭
通过JQuery取得$("#id")来完成onClick监听即可。
360正解

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

The article discusses the <iframe> tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

This article explains the HTML5 <time> element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Dreamweaver CS6
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Atom editor mac version download
The most popular open source editor

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.
