会员可以在此提问,百战程序员老师有问必答
对大家有帮助的问答会被标记为“推荐”
看完课程过来浏览一下别人提的问题,会帮你学得更全面
截止目前,同学们一共提了 132989个问题
Python 全系列/第八阶段:轻量级Web开发利器-Flask框架/Flask视图高级 22636楼
Python 全系列/第十八阶段:数据分析-数据管理/Pandas的使用 22637楼
JAVA 全系列/第十一阶段:智能家居项目(旧)/至尊智能家居第二天 22638楼
JAVA 全系列/第十八阶段:亿级高并发电商项目_架构/编码(旧)/电商:使用RabbitMQ实现大广告异步缓存 22639楼
Python 全系列/第二阶段:Python 深入与提高/GUI编程(隐藏) 22641楼
JAVA 全系列/第五阶段:JavaWeb开发/Servlet技术详解(旧) 22648楼

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>轮播图的设计与实现</title>
    <link rel="stylesheet" href="reset.css">
    <style>
        .wrapper{
            width:600px;
            height:600px;
            position:relative; 
        }
        .content{
            width:300px;
            height:300px;
        }
        .items{position: relative;}
        .items img{
            width:300px;
            height:300px;
            position:absolute;
        }
        .circle li{
            width:10px;
            height:10px;
            border-radius:50%;
            background-color: chocolate;
            float:left;
            margin: 0 6px;
        }
        .circle{position:absolute;right:160px;
        bottom:320px;}
        .prev{
        position:absolute;
        left:180px;
        top:200px;
        width:40px;
        height:60px;
        background: url("image/6.png");
        background-size: 40px;
        background-repeat: no-repeat;
        
    }
     .next{
        position:absolute;
        right:180px;
        top:200px;
        width:40px;
        height:60px;
        background: url("image/7.png");
        background-size: 40px;
        background-repeat: no-repeat;
        
    }
    </style>
</head>
<body>
    <div class="wrapper">
       <div class="content">
       <div class="items"><img src="image/luo1.jpg" alt=""></div>
       <div class="items"><img src="image/luo6.jpg" alt=""></div>
       <div class="items"><img src="image/luo3.jpg" alt=""></div>
       <div class="items"> <img src="image/luo4.jpg" alt=""></div>
       <div class="items"><img src="image/luo5.jpg" alt=""></div>
       <div class="items"> <img src="image/luo3.jpg" alt=""></div>
       </div>
       <ul class="circle">
        <li id="pic1"></li>
        <li id="pic2"></li>
        <li id="pic3"></li>
        <li id="pic4"></li>
        <li id="pic5"></li>
        <li id="pic6"></li>
    </ul>
     <!-- 图片左右方来回滚动图片的左右箭头-->
     <a href=" " class=" prev"></a>
     <a href="#" class=" next"></a> 
    </div>  
</body>
</html>

老师,我这里content没有设置居中,图片应该在最左侧,这里怎么显示在这个位置?图片.png

WEB前端全系列/第一阶段:HTML5+CSS3模块/CSS3新特性 22649楼

为什么最后一个子标签不是文本,</script>和</body>之间不是有空格吗

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<div  class="div1">div1
    <div  id="div2">div2</div>
</div>
<span>这是span标签</span>
<script>
    var div1=document.querySelector('.div1');
    var div2=document.querySelector('#div2');
    var span=document.querySelector('span');
    /*
    1.textContent
    描述:返回当前节点和它的所有后代节点的文本内容。
     var result=document.getElementById('divA').textContent// This is some text
     console.log(result);
     2.nodeValue
     描述:nodeValue属性一般只用于Text节点
     console.log(span.firstChild.nodeValue);
     span.firstChild.nodeValue='新的span值';
     3.childNodes属性
     描述:childNodes属性返回一个节点集合(NodeList),节点集合中包括当前节点的所有子节点
     例子:
     var childList=div1.childNodes;
     console.log(childList);
     console.log(childList.length);
     console.log(childList instanceof  Array);
     console.log(childList[1]);
     4.firstChild/ lastChild
     描述:返回第一个\最后一个子节点,如果不存在返回null
     console.log(div1.firstChild);
     console.log(div1.lastChild);
     */
        console.log(document.body.firstChild);
        console.log(document.body.lastChild);
</script>
</body>
</html>

blob.png

WEB前端全系列/第二阶段:JavaScript编程模块/DOM模型 22650楼

课程分类

百战程序员微信公众号

百战程序员微信小程序

©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园
网站维护:百战汇智(北京)科技有限公司
京公网安备 11011402011233号    京ICP备18060230号-3    营业执照    经营许可证:京B2-20212637