<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
#back{
background:url(background/${gameinformation.gid}.gif);
background-repeat:no-repeat;
background-position:center;
background-attachment:fixed;
width: 100%;
height: 100%;
background-size:100% 100%;
}
#seal{
background-image:url(seal/${gameinformation.gid}.gif);
background-repeat:no-repeat;
width: 30%;
height: 30%;
position: relative;
top: 60%;
left: 65%;
background-size:80% 90%;
}
</style>
</head>
<body >
<div id="back">
<div id="seal">
</div>
</div>
</body>
</html>
一個div相對另一個div相對浮動,且改變窗口大小之後,浮動的位置不變
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.