我对这项任务有疑问我知道我混淆了这么多东西而且根本不起作用。请你帮助我好吗? 这是任务
必须打开叠加层 在指定的左侧和顶部位置。应指定这些职位 在用于打开叠加层的链接中,使用自定义数据属性data-x和data-y 显示叠加 如果没有提供两个数据属性或仅提供其中一个,则 CSS的默认值应该用于缺失值。也, 确保data-x和data-y的值不在窗口区域之外。 您可以访问当前浏览器窗口的内部宽度和内部高度 分别使用window.innerWidth和window.innerHeight。
Error resolving version for plugin 'org.apache.maven.plugins:maven-javadoc-plugin' from the repositories [local (C:\Users
\myname\.m2\repository), nexus-chrono (http://192.168.241.125:8081/nexus/content/groups/public/)]: Plugin not found in any
plugin repository
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>es.chx</groupId>
<artifactId>parent-pom</artifactId>
<version>2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>es.chx.gestionEnvios</groupId>
<artifactId>gestionEnvios</artifactId>
<name>gestionEnvios</name>
<packaging>war</packaging>
<properties>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<org.springframework-version>2.5</org.springframework-version>
</properties>
<dependencies>
<dependency>
<groupId>es.chx</groupId>
<artifactId>arq-chx</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!-- <dependency> -->
<!-- <groupId>es.chx.web</groupId> -->
<!-- <artifactId>loginLiferayFromApp</artifactId> -->
<!-- <version>1.0-SNAPSHOT</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>es.chx.web</groupId> -->
<!-- <artifactId>commonWeb</artifactId> -->
<!-- <version>1.0-SNAPSHOT</version> -->
<!-- </dependency> -->
<!-- --> <dependency>
<!-- --> <groupId>es.chx.intranet</groupId>
<!-- --> <artifactId>commonIntranet</artifactId>
<!-- --> <version>1.0</version>
<!-- --> </dependency>
<dependency>
<groupId>displaytag</groupId>
<artifactId>displaytag-doc</artifactId>
<version>1.2</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>displaytag</groupId>
<artifactId>displaytag</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>displaytag</groupId>
<artifactId>displaytag-export-poi</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>org.ajaxtags</groupId>
<artifactId>ajaxtags</artifactId>
<version>1.3-beta-rc7</version>
</dependency>
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.2.3</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib-ext-spring</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>es.chx.web</groupId>
<artifactId>dwr</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>2.2.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.2.0.Final</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
</dependency>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.2.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>2.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>1.3</version>
</dependency>
</dependencies>
<repositories>
<repository>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>nexus-chrono</id>
<url>http://192.168.241.125:8081/nexus/content/groups/public/</url>
</repository>
<repository>
<id>apache.snapshots</id>
<name>Maven Plugin Snapshots</name>
<url>http://repository.apache.org/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration></configuration>
</plugin>
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
<configuration>
<additionalProjectnatures>
<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
</additionalProjectnatures>
<additionalBuildcommands>
<buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
</additionalBuildcommands>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
</configuration>
</plugin>
</plugins>
</build>
</project>
答案 0 :(得分:1)
是的,你混淆了一些事情,看看这个:
$(function() {
$('a.overlay-link').on('click', function() {
var my_overlay_id = $( $(this).attr('data-overlay-id') ) ,
left = $(this).attr('data-x') ,
top = $(this).attr('data-y') ,
winW = $(window).width() ,
winH = $(window).height();
if( left > winW ) { left = 100; }
if( top > winH ) { top = 100; }
my_overlay_id.prepend('<div class="overlay-close"></div>').show();
my_overlay_id.css({left: left+'px', top: top+'px'}).show();
});
$(document).on('click', '.overlay-close', function() {
$('.overlay').hide();
});
});
&#13;
/* The Overlay: */
.overlay {
/* General properties: */
/* - Hidden when the page is first displayed */
display: none;
/* - Displayed on top of the other page elements */
z-index: 10000;
/* - Fixed position */
position: fixed;
top: 50px;
left: 50px;
/* Appearance: */
background-color: #ffffcc;
width: 200px;
height: 200px;
padding: 5px;
border: 1px solid #000000;
-moz-box-shadow: 0 0 40px 5px #000000;
box-shadow: 0 0 40px 5px #000000;
-webkit-box-shadow: 0 0 40px 5px #000000;
}
/* The Close Button: */
.overlay-close {
/* Button image: */
background-image: url(picture.jpg);
/* Location: */
position: absolute;
right: -15px;
top: -15px;
/* Mouse cursor: */
cursor: pointer;
/* Size: */
height: 35px;
width: 35px;
border: 1px solid red;
}
&#13;
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<h3>Output:</h3>
<div id="overlay1" class="overlay">
<h2 data-overlay-title = 'Jesus I love you'>Hello, World!</h2>
<p>I am an overlay.</p>
</div><a href="#" data-overlay-id="#overlay1" class="overlay-link" data-x="1000" data-y="1000" >Show Overlay</a>
<br />
<div id="overlay1" class="overlay">
<h2 data-overlay-title = 'Jesus I love you'>Hello, World!</h2>
<p>I am an overlay.</p>
</div><a href="#" data-overlay-id="#overlay1" class="overlay-link" data-x="250" data-y="0" >Show Overlay</a>
&#13;