search
HomeWeb Front-endHTML Tutorial求助:关于使用jquery UI组件后页面被某个div遮罩导致超级连接无法点击的问题_html/css_WEB-ITnose

本帖最后由 bbsince1991 于 2013-05-18 11:44:13 编辑

我使用了jquery ui组件jqgird。
正常的显示效果为:


但是我在另一个项目使用的时候,就出现了一个问题,那就是貌似页面被一个半透明的层遮罩住了,导致了页面颜色变暗和导航栏无法被点击。

出现问题的页面(整个页面大部分出现颜色变暗以及导航栏的标签无法被点击的问题):


其他正常的页面(没有使用jqgrid的页面颜色正常,导航栏可点击):


估计出现遮罩效果的div:

CSS:


附上页面的代码:
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%><%	String path = request.getContextPath();	String basePath = request.getScheme() + "://"			+ request.getServerName() + ":" + request.getServerPort()			+ path + "/";%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>	<head>		<base href="<%=basePath%>">		<title></title>		<meta http-equiv="pragma" content="no-cache">		<meta http-equiv="cache-control" content="no-cache">		<meta http-equiv="expires" content="0">		<meta http-equiv="keywords" content="vote">			<meta http-equiv="description" content="Voting System">		<link rel="stylesheet" type="text/css"			href="css/jquery-ui-1.9.2.custom.css" />		<link rel="stylesheet" type="text/css" href="css/ui.jqgrid.css" />		<link href="css/voteStyle.css" rel="stylesheet" type="text/css" />		<link href="css/ddsmoothmenu.css" rel="stylesheet" type="text/css" />		<script type="text/javascript" src="scripts/jquery-1.8.3.js"></script>		<script type="text/javascript" src="scripts/ddsmoothmenu.js"></script>		<script type="text/javascript"			src="scripts/jquery.KinSlideshow-1.2.1.js"></script>		<script type="text/javascript" src="scripts/webtry_roll.js"></script>		<script type="text/javascript" src="scripts/utils.js"></script>		<script type="text/javascript" src="scripts/jquery-ui-1.9.2.custom.js"></script>		<script type="text/javascript" src="scripts/jquery.jqGrid.src.js"></script>		<script type="text/javascript" src="scripts/grid.locale-cn.js"></script>			<script type="text/javascript">	$(document).ready(function() {		$("#gridTable").jqGrid({			url : 'getThemes.action',//获取数据的地址			datatype : "json",			height : 300,			autowidth : true,			colNames : [ '主题ID', '主题', '主题内容', '发起人' ],			colModel : [ {				name : "id",				index : "id",				label : "主题ID",				width : 30,				sortable : true,				resizable : true			}, {				name : "themeName",				index : "themeName",				label : "主题",				width : 50,				sortable : true,				resizable : true			}, {				name : "themeContent",				index : "themeContent",				label : "主题内容",				width : 120,				sortable : true,				resizable : true			}, {				name : "creator",				index : "creator",				label : "发起人",				width : 60,				sortable : false,				resizable : true			}, ],			sortname : 'themeID',			sortorder : 'desc',			viewrecords : true,			rowNum : 10,			rowList : [ 10, 20, 30 ],			jsonReader : {				root : "dataRows", // 数据行(默认为:rows)				page : "curPage", // 当前页				total : "totalPages", // 总页数				records : "totalRecords", // 总记录数				repeatitems : false			// 设置成false,在后台设置值的时候,可以乱序。且并非每个值都得设			},			prmNames : {				rows : "page.pageSize",				page : "page.curPageNo",				sort : "page.orderBy",				order : "page.order"			},			pager : "#gridPager",			caption : "我的投票",			onCellSelect : function(id) {				window.location.href = "test.html?id=" + id;			}		}).navGrid('#gridPager', {			edit : false,			add : false,			del : false		});	});</script>	</head>	<body>		<div id="mainW">			<div id="topSpace">				<div id="log">					<%						String USERID = (String) session.getAttribute("ID");						if (USERID == null) {							out.println("<a href='login.jsp' >登录</a>" + "|"									+ "<a href='register.jsp' >注册</a>");						} else {							out.println("<a href='logout.action' >退出系统</a>");						}					%>				</div>			</div>			<div id="menuSpace" class="ddsmoothmenu">				<ul>					<li>						<a href="index.jsp" title="主页" id="menu_selected"> <span>主页</span>						</a>					</li>					<%						if (USERID != null) {							out.println("<li><a href='ownTheme.jsp' title='我的主题'> <span>我的主题</span></a></li><li><a href='getUserData.action' title='资料管理'> <span>资料管理</span> </a></li>");							String USERTYPE = (String) session.getAttribute("USERTYPE");							if ("admin".equals(USERTYPE)) {								out.println("<li><a href='themeManagement.jsp' title='主题管理'> <span>主题管理</span></a></li><li><a href='addadmin.jsp' title='创建管理员'> <span>创建管理员</span></a></li>");							}						}					%>				</ul>			</div>			<div id="contentSpace">				<table id="gridTable"></table>				<div id="gridPager"></div>			</div>			<div id="copyright">				Copyright &copy;2012  BBB  All Rights Reserved.				<br />				<span>地址: </span>ZHBIT				<span>邮编: </span>519085				<br />				<span>联系人: </span>BBB				<span>手机: </span>123456				<br />				<span>邮箱: </span>bb@hotmail.com			</div>		</div>	</body>	</body></html>

回复讨论(解决方案)

给contentSpace加上position: relative;

给contentSpace加上position: relative; 真的解决了,谢谢你!不过我想请你继续解释一下这个问题的因由,可以吗?

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
Difficulty in updating caching of official account web pages: How to avoid the old cache affecting the user experience after version update?Difficulty in updating caching of official account web pages: How to avoid the old cache affecting the user experience after version update?Mar 04, 2025 pm 12:32 PM

The official account web page update cache, this thing is simple and simple, and it is complicated enough to drink a pot of it. You worked hard to update the official account article, but the user still opened the old version. Who can bear the taste? In this article, let’s take a look at the twists and turns behind this and how to solve this problem gracefully. After reading it, you can easily deal with various caching problems, allowing your users to always experience the freshest content. Let’s talk about the basics first. To put it bluntly, in order to improve access speed, the browser or server stores some static resources (such as pictures, CSS, JS) or page content. Next time you access it, you can directly retrieve it from the cache without having to download it again, and it is naturally fast. But this thing is also a double-edged sword. The new version is online,

How do I use HTML5 form validation attributes to validate user input?How do I use HTML5 form validation attributes to validate user input?Mar 17, 2025 pm 12:27 PM

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

What are the best practices for cross-browser compatibility in HTML5?What are the best practices for cross-browser compatibility in HTML5?Mar 17, 2025 pm 12:20 PM

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

How to efficiently add stroke effects to PNG images on web pages?How to efficiently add stroke effects to PNG images on web pages?Mar 04, 2025 pm 02:39 PM

This article demonstrates efficient PNG border addition to webpages using CSS. It argues that CSS offers superior performance compared to JavaScript or libraries, detailing how to adjust border width, style, and color for subtle or prominent effect

What is the purpose of the <datalist> element?What is the purpose of the <datalist> element?Mar 21, 2025 pm 12:33 PM

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

What is the purpose of the <progress> element?What is the purpose of the <progress> element?Mar 21, 2025 pm 12:34 PM

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

How do I use the HTML5 <time> element to represent dates and times semantically?How do I use the HTML5 <time> element to represent dates and times semantically?Mar 12, 2025 pm 04:05 PM

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

What is the purpose of the <meter> element?What is the purpose of the <meter> element?Mar 21, 2025 pm 12:35 PM

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

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

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 agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment