会员可以在此提问,百战程序员老师有问必答
对大家有帮助的问答会被标记为“推荐”
看完课程过来浏览一下别人提的问题,会帮你学得更全面
截止目前,同学们一共提了 132372个问题
WEB前端全系列/第十四阶段:微信小程序/小程序API 7861楼
Python 全系列/第二阶段:Python 深入与提高/(旧)坦克大战 7862楼

<!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>Document</title>

    <style>

        body{

            background-color: #f5f5f5;

        }

        .exhibit{

            width: 1226px;

            height: 628px;

            margin: 0 auto;

            /* background-color: aqua; */

        }

        .left{

            float: left;

            width: 234px;

            height: 614px;

            /* background-color: black; */

        }

        .right{

            float: right;

            width: 992px;

            height: 614px;

            /* background-color: #fff; */

        }

        .box{

            float: left;

            width: 234px;

            height: 300px;

            padding: 20 auto;

            margin-bottom: 14px;

            margin-left: 14px;

            background-color: #fff;

            text-align: center;

        }

        .sal{

            height: 160px;

            width:160px;

            margin-top: 20px;

        }

        .ex{

            height: 614px;

            width: 234px;

        }

        .title{

            margin: 0 10px 2px;

            font-size: 14px;

            font-weight: 400;

            color: #333;

            text-align: center;


        }

        .desc{

            margin: 0 10px 10px;

            height: 18px;

            font-size: 12px;

            color: #b0b0b0;

            text-overflow: ellipsis;

            white-space: nowrap;

            text-align: center;

            overflow: hidden;

        }

        .price{

            margin: 0 10px 14px;

            text-align: center;

            color: #ff6700;

        }


    </style>

</head>

<body>

    <div class="exhibit">

        <div class="left">

            <img src="./images/1.webp" alt="1" class="ex">

        </div>

        <div class="right">

            <div class="box">

                <img src="./images/2.webp" alt="1" class="sal">

                <h3 class="title">Redmi Note 11 5G</h3>

                <p class="desc">5000mAh大电量</p>

                <p class="price">1119元</p>


            </div>

            <div class="box">

                <img src="./images/2.webp" alt="1" class="sal">

                <h3 class="title">Redmi Note 11 5G</h3>

                <p class="desc">5000mAh大电量</p>

                <p class="price">1119元</p>

            </div>

            <div class="box">

                <img src="./images/2.webp" alt="1" class="sal">

                <h3 class="title">Redmi Note 11 5G</h3>

                <p class="desc">5000mAh大电量</p>

                <p class="price">1119元</p>

            </div>

            <div class="box">

                <img src="./images/2.webp" alt="1" class="sal">

                <h3 class="title">Redmi Note 11 5G</h3>

                <p class="desc">5000mAh大电量</p>

                <p class="price">1119元</p>

            </div>

            <div class="box">

                <img src="./images/2.webp" alt="1" class="sal">

                <h3 class="title">Redmi Note 11 5G</h3>

                <p class="desc">5000mAh大电量</p>

                <p class="price">1119元</p>

            </div>

            <div class="box">

                <img src="./images/2.webp" alt="1" class="sal">

                <h3 class="title">Redmi Note 11 5G</h3>

                <p class="desc">5000mAh大电量</p>

                <p class="price">1119元</p>

            </div>

            <div class="box">

                <img src="./images/2.webp" alt="1" class="sal">

                <h3 class="title">Redmi Note 11 5G</h3>

                <p class="desc">5000mAh大电量</p>

                <p class="price">1119元</p>

            </div>

            <div class="box">

                <img src="./images/2.webp" alt="1" class="sal">

                <h3 class="title">Redmi Note 11 5G</h3>

                <p class="desc">5000mAh大电量</p>

                <p class="price">1119元</p>

            </div>

        </div>

    </div>

</body>

</html>

image.png

WEB前端全系列/第一阶段:HTML5+CSS3模块/初识CSS 7863楼

<style>
        body {
            background-color: #f1f1f1;
        }

        .phone {
            width: 1300px;
            height: 680px;
            margin: 0 auto;
        }

        .left {
            float: left;
            width: 234px;
            height: 680px;
            margin-top: 10px;
            background-color: pink;
        }

        .right {
            float: right;
            width: 1050px;
        }

        .item {
            width: 250px;
            height: 335px;
            float: left;
            margin-left: 10px;
            background-color: rgb(215, 212, 212);
            margin-top: 10px;
            text-align: center;
        }
        .left img {
            width: 234px;
            height: 680px;
        }
        .right img {
            width: 220px;
            height: 220px;
        }
    </style>

</head>

<body>
    <div class="phone">
        <div class="left">
            <img src="./images/1.webp">
        </div>
        <div class="right">
            <div class="item">
                <img src="./images/2.webp">
                <h3>黑鲨4S</h3>
                <p>磁动力升降肩键</p>
            </div>
            <div class="item">
                <img src="./images/2.webp">
                <h3>黑鲨4S</h3>
                <p>磁动力升降肩键</p>
            </div>
            <div class="item">
                <img src="./images/2.webp">
                <h3>黑鲨4S</h3>
                <p>磁动力升降肩键</p>
            </div>
            <div class="item">
                <img src="./images/2.webp">
                <h3>黑鲨4S</h3>
                <p>磁动力升降肩键</p>
            </div>
            <div class="item">
                <img src="./images/2.webp">
                <h3>黑鲨4S</h3>
                <p>磁动力升降肩键</p>
            </div>
            <div class="item">
                <img src="./images/2.webp">
                <h3>黑鲨4S</h3>
                <p>磁动力升降肩键</p>
            </div>
            <div class="item">
                <img src="./images/2.webp">
                <h3>黑鲨4S</h3>
                <p>磁动力升降肩键</p>
            </div>
            <div class="item">
                <img src="./images/2.webp">
                <h3>黑鲨4S</h3>
                <p>磁动力升降肩键</p>
            </div>
        </div>
    </div>
</body>

image.png

WEB前端全系列/第一阶段:HTML5+CSS3模块/初识CSS 7864楼

<style>
        .box {
            width: 300px;
            height: 300px;
        }

        .left {
            float: left;
            width: 100px;
            height: 300px;
            background-color: rgb(209, 106, 106);
        }

        .right {
            float: right;
            width: 200px;
            height: 150px;
        }

        .top {
            float: top;
            width: 200px;
            height: 150px;
            background-color: skyblue;
        }

        .bottom {
            float: bottom;
            width: 200px;
            height: 150px;
        }

        .b-left {
            float: left;
            width: 100px;
            height: 150px;
            background-color: blue;
        }
        .b-right {
            float: right;
            width: 100px;
            height: 150px;
            background-color: rgb(44, 191, 183);
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="left"></div>
        <div class="right">
            <div class="top"></div>
            <div class="bottom">
                <div class="b-left"></div>
                <div class="b-right"></div>
            </div>
        </div>
    </div>
</body>

image.png

WEB前端全系列/第一阶段:HTML5+CSS3模块/初识CSS 7865楼
WEB前端全系列/第十六阶段:React企业级项目/宜居(商城类)高级React实战项目 7867楼
WEB前端全系列/第十六阶段:React企业级项目/宜居(商城类)高级React实战项目 7868楼

老师对于表格而言我不太理解以下几点

1、我个人实现的时候不知道为什么外边会有两个边框的样子

我的代码如下:

 <table  border="1" cellspacing="0" align="center" width="500" height="300">

            <tr align="center">

                <td colspan="4">教员搜索</td>

            </tr>

            <tr>

                <td><label for="search">搜索类型</label></td>

                <td>

                    <select name="search" id="search">

                        <option value="title">搜索教员信息</option>

                        <option value="java">java</option>

                        <option value="web">web</option>

                    </select>

                </td>

                <td><label for="id">教员身份</label></td>

                <td><select name="id" id="id">

                    <option value="title">不限</option>

                    <option value="title">高级讲师</option>

                    <option value="title">中级讲师</option>

                </select></td>

            </tr>

            <tr>

                <td><label for="area">所在地区</label></td>

                <td><select name="area" id="area">

                    <option value="title">不限</option>

                    <option value="title">北京</option>

                    <option value="title">上海</option>

                </select></td>

                <td><label for="sex">性别</label></td>

                <td>

                    <input type="radio" name="sex" value="male">

                    <br>

                    <input type="radio" name="sex" value="female">

                </td>

            </tr>

            <tr>

                <td><label for="subject">学习科目</label></td>

                <td colspan="3">

                    <select name="subject" id="subject">

                        <option value="title">请在以下列表中选择</option>

                        <option value="title">java</option>

                        <option value="title">web</option>

                    </select>

                </td>

            </tr>

            <tr>

                <td>学习</td>

                <td colspan="3">

                    <input type="text" name="learning" placeholder="请输入要学习的内容">

                </td>

            </tr>

            <tr>

                <td>专业</td>

                <td colspan="3">

                    <input type="text" name="special" placeholder="请输入要学习的内容">

                    <input type="button" name="search" value="search">

                </td>

            </tr>

        </table>

2、我对里面的,例如<input type="button" name="search" value="search">

中的name 和value表达的含义不是很理解

3、如果想要效果是三线表这种,怎么实现呢?我的想法是利用孩子选择器把某些线加粗但是没能达到该效果,老师能帮我看一下嘛?

    <style>

        table{

            width: 500px;

            height: 150px;

        }

        table:nth-child(1){

            border-top: 2px solid black;

            border-bottom: 2px solid black ;

        }

        table:last-child{

            border-bottom: 2px solid black ;

        }

   

    </style>


  <table>

        <tr class="style">

            <td>指标一</td>

            <td>指标二</td>

            <td>指标三</td>

        </tr>

        <tr>

            <td>4</td>

            <td>6</td>

            <td>7</td>

        </tr>

        <tr>

            <td>14</td>

            <td>34</td>

            <td>23</td>

        </tr>

        <tr>

            <td>87</td>

            <td>-</td>

            <td>78</td>

        </tr>

    </table>




WEB前端全系列/第一阶段:HTML5+CSS3模块/表单 7870楼

微信图片_20221021161638.png

// pages/musicList/musicList.js
const {request}=require('../../utils/request')
Page({

    /**
     * 页面的初始数据
     */
    data: {
      songs:[],
      limit:20,
      offset:1,
      search:''
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {
  console.log(options);
  this.setData({
      search:options.search
  })
  this.http(this.data.search,this.data.limit,this.data.offset)
    },
http(keywords,limit,offset){
    request("http://iwenwiki.com:3000/search",{keywords,limit,offset},'GET').then(res=>{
        console.log(res);
        if(res.data.result.songs){
            this.setData({
                songs:this.data.songs.concat(res.data.result.songs)
            })
        }else{
            wx.showToast({
              title: '暂无数据',
            })
        }
    }).catch(err=>{
        wx.showToast({
          title: '请求出错了',
        })
        console.log(err);
    })
},
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady() {

    },

    /**
     * 生命周期函数--监听页面显示
     */
    onShow() {

    },

    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide() {

    },

    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload() {

    },

    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh() {
         this.setData({
             offset:1,
             songs:[]
         })
         this.http(this.data.search,this.data.limit,this.data.offset)
    },
    //跳转到播放器页面
    goToPlayer(e){
        console.log(e);
        
        console.log(e.currentTarget.dataset);
        console.log(e.currentTarget.dataset.id);
        wx.navigateTo({
          url: '../player/player?id=?'+e.currentTarget.dataset.id
        })
    },

    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom() {
        this.setData({
            offset: this.data.offset += 20
           })
          this.http(this.data.search, this.data.limit, this.data.offset)
         
    },

    /**
     * 用户点击右上角分享
     */
    onShareAppMessage() {

    }
})


console.log(e.currentTarget.dataset)

老师 为啥我正常  

 console.log(e.currentTarget.dataset.id);

underfind呢?

WEB前端全系列/第十四阶段:微信小程序/小程序API 7871楼
JAVA 全系列/第二阶段:JAVA 基础深化和提高/IO流技术 7872楼
JAVA 全系列/第六阶段:项目管理与SSM框架/SpringMVC旧 7873楼
Python 全系列/第十九阶段:数据分析-数据管理/Pandas(旧) 7874楼

课程分类

百战程序员微信公众号

百战程序员微信小程序

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