第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

請(qǐng)問這個(gè)是怎么回事,沒有出現(xiàn)頁面切換

<%@ 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 HTML 4.01 Transitional//EN">

<html>

? <head>

? ? <base href="<%=basePath%>">

? ??

? ? <title>My JSP 'index.jsp' starting page</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="keyword1,keyword2,keyword3">

<meta http-equiv="description" content="This is my page">

<!--

<link rel="stylesheet" type="text/css" href="styles.css">

-->

<title>慕課七夕主題</title>

? ? <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>

? ? <style type="text/css">

? ? /*初始化所有元素*/

? ? *{

? ? padding:0;

? ? margin:0;

? ? }

? ? /*去點(diǎn)*/

? ? ul,li{

? ? list-style-type:none;

? ? }

? ? /*主體部分*/

? ? #content{

? ? width:60%;

? ? height:60%;

? ? /*top:20%;

? ? left:20%;*/

? ? overflow:hidden;

? ? position:absolute;/*絕對(duì)定位*/

? ? border:1px solid #ccc;/*設(shè)置邊框?qū)挾龋瑯邮剑▽?shí)線、虛線、點(diǎn)線),顏色*/

? ? }

? ? .content-wrap{

? ? position:relative;/*相對(duì)定位*/

? ? }

? ? .content-wrap>li{

? ? width:100%;

? ? height:100%;

? ? background:#CAE1FF;

? ? color:red;

? ? float:right;

? ? overflow:hidden;

? ? position:relative;/*相對(duì)定位*/

? ? }

? ? /*CSS3:選取li的第二個(gè)標(biāo)簽*/

? ? li:nth-child(2){

? ? background: #9BCD9B;

? ? }

? ? /*CSS3:選取li的第三個(gè)標(biāo)簽*/

? ? li:nth-child(3){

? ? background: yellow;

? ? }

? ? button{

? ? width:100px;

? ? height:50px;

? ? }

? ? .button{

? ? position:absolute;

? ? bottom:0;

? ? }

? ? </style>

? ??

? </head>

??

? <body>

? ? <div id="content">

? ? <ul class="content-wrap">

? ? <li>頁面一</li>

? ? <li>頁面二</li>

? ? <li>頁面三</li>

? ? </ul>

? ? <div class="button">

? ? <button>點(diǎn)擊切換頁面</button>

? ? </div>

? ? </div>

? ? <script type="text/javascript">

? ? var container = $("#content");//div

? ? ? ? // 獲取第一個(gè)子節(jié)點(diǎn)

? ? ? ? var element = container.find(":first");//ul

? ? ? ? // li頁面數(shù)量

? ? ? ? var slides = element.find("li");//li

? ? ? ? // 獲取容器尺寸

? ? ? ? var width = container.width();

? ? ? ? var height = container.height();

? ? ? ? // 設(shè)置li頁面總寬度

? ? ? ? element.css({

? ? ? ? width:(slides.length*width)+'px',

? ? ? ? height:height+'px'

? ? ? ? });

? ? ? ? // 設(shè)置每一個(gè)頁面li的寬度

? ? ? ? $.each(slides,function(index){

? ? ? ? var slides=slides.eq(index);//獲取第幾個(gè)slides

? ? ? ? slides.css({

? ? ? ? width:width+'px',

? ? ? ? height:height+'px'

? ? ? ? });

? ? ? ? });

? ? ? ? // 綁定一個(gè)事件,觸發(fā)通過

? ? ? ? $('button').click(function() {

? ? ? ? ? ? // 在5秒的時(shí)間內(nèi),移動(dòng)X的位置,為2個(gè)頁面單位

? ? ? ? ? ? element.css({

? ? ? ? ? ? ? ? 'transition-timing-function': 'linear',

? ? ? ? ? ? ? ? 'transition-duration': '5000ms',

? ? ? ? ? ? ? ? 'transform': 'translate3d(-' + (width * 2) + 'px,0px,0px)' //設(shè)置頁面X軸移動(dòng)

? ? ? ? ? ? });

? ? ? ? });

? ? </script>

? </body>

</html>


正在回答

1 回答

http://img1.sycdn.imooc.com//5d75d70100019e0705630270.jpg

運(yùn)行你的代碼的時(shí)候,提示錯(cuò)誤并沒有定義eq屬性,到代碼里查找錯(cuò)誤發(fā)現(xiàn)你定義了兩個(gè)相似的變量,也不是說兩個(gè)相似變量吧,就是用的時(shí)候發(fā)生沖突了。

http://img1.sycdn.imooc.com//5d75d9eb0001411e06520332.jpg

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

請(qǐng)問這個(gè)是怎么回事,沒有出現(xiàn)頁面切換

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)