RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

Close
  • 主页
  • 系统&网络
    • 热门问题
    • 最新问题
    • 标签
  • Ubuntu
    • 热门问题
    • 最新问题
    • 标签
  • 帮助
主页 / user-401168

Дмитрий Алёхин's questions

Martin Hope
Дмитрий Алёхин
Asked: 2025-03-06 00:02:07 +0000 UTC

在 JavaScript 中递归迭代数组

  • 5
const data = {
    group: "Group1",
    attributes: { name: "Item1" },
    children: [
        { attributes: { name: "SubItem1" } },
        { attributes: { name: "SubItem2" } },
        {
            group: "Group2",
            attributes: { name: "Item2" },
            children: [{ attributes: { name: "SubItem3" } }, { attributes: { name: "SubItem4" } }],
        },
    ],
};

结果

{
Group1: [Item1,SubItem1,SubItem2, Item2,SubItem3,SubItem4],
Group2: [Item2,SubItem3,SubItem4]
}

数组中的顺序并不重要。

javascript
  • 1 个回答
  • 71 Views
Martin Hope
Дмитрий Алёхин
Asked: 2020-10-01 13:56:25 +0000 UTC

flexBOX 嵌套图像的奇怪行为

  • 0

我从事自学,遇到这样一个问题,解决起来很笨=(

  • 我希望滑块具有自适应性,但图片表现不佳,我喜欢它们爬出 flexBOX 过道,但同时 max-width: 960px; 对于容器它不起作用如何修复它没看懂=(
  • 自己写了一小段js代码,只是个拐杖,所以不想用,或许有一些足够的解决办法?

(function () {
    let MyWidth = document.documentElement.clientWidth;
    let MyImagesSlayder = slayder.querySelectorAll("img");
    for(let kay of MyImagesSlayder){ //кастыль на ширену CSS
        kay.style.maxWidth = MyWidth +"px";
    }
    console.log(MyWidth);
 }());
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');
*{
    margin: 0px;
    padding: 0px;
}
body{
    font-family: "roboto";
}
.content{
    margin: auto;
    max-width: 960px;
}
.slayder{
    max-width: 960px;
    position: relative;
}
.slayder-images-box{
    display: flex;
}
.box-slayder{
    position: relative;
    display: flex;
    max-width: 960px;
}
.box-slayder img{
    height: 400px;
    /* width: 100%; */
    /* Хочу чтобы было адаптивно но фотографии сжимаются =(*/
    
}

/* ================== */

.box-slayder a{
    font-size: 30px;
    position: absolute;
    bottom: 50px;
    left: 70px;
    padding: 20px;
    width: 350px;
    color: #fff;
    background: #000;
    opacity: 0.7;
    text-decoration: none;
}
.battan-slayder{
    display: flex;
    justify-content: space-between;
    position: absolute;
    width: 100%;
    top: 50%;
    font-size: 40px;
    color: #fff;
}
.battan-slayder i {
    margin: 0px 20px;
    opacity: 0.7;
}
.battan-slayder i:hover {
    opacity: 1;
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" type="text/css" href="style/global_Stale.css">
    <link rel="stylesheet" href="libs/font-css/all.min.css">
</head>
<body>
    
    <div class="content">
        <div class="slayder" id="slayder">
            <div class="slayder-images-box">
                <div class="box-slayder box-1">
                    <img src="https://www.supervizuelna.com/wp-content/uploads/2018/01/1-960x380.jpg" alt="">
                    <a href="#">Lorem ipsum, dolor sit, amet consectetur adipisicing elit.</a>
                </div>
                <div class="box-slayder ">
                    <img src="http://www.wsyc.org.uk/wp-content/uploads/2019/05/featuredimage-The-Connection-Between-Las-Vegas-and-Skiing-960x380.png" alt="">
                    <a  href="#">Commodi culpa magnam distinctio, facere facilis corrupti quis.</a>
                </div>
                <div class="box-slayder">
                    <img src="https://www.supervizuelna.com/wp-content/uploads/2018/01/1-960x380.jpg" alt="">
                    <a  href="#">Possimus iure odit, voluptates sapiente nobis aspernatur, suscipit.</a>
                </div>
                <div class="box-slayder">
                    <img src="http://www.wsyc.org.uk/wp-content/uploads/2019/05/featuredimage-The-Connection-Between-Las-Vegas-and-Skiing-960x380.png" alt="">
                    <a  href="#">Vel nesciunt voluptatem, quis nobis in minus quasi!</a>
                </div>
                
            </div>
            <div class="battan-slayder">
                <i class="fas fa-angle-left"></i>
                <i class="fas fa-angle-right"></i>
            </div>

        </div>
    </div>
    <script src="js/slayder.js"></script>
</body>
</html>

css
  • 1 个回答
  • 10 Views
Martin Hope
Дмитрий Алёхин
Asked: 2020-07-31 18:53:53 +0000 UTC

PHP 错误:\Ds\Stack() 类未找到

  • 0

我使用使用线性堆栈 \Ds\Stack() 的官方示例:https ://www.php.net/manual/en/class.ds-stack.php

$stack = new \Ds\Stack();

$stack->push("a");
$stack->push("b");
$stack->push("c");

var_dump($stack->pop());
var_dump($stack->pop());
var_dump($stack->pop());

引发错误:致命错误:未捕获错误:在 C:\OSPanel\domains\lab5.CD\index.php:2 中找不到类 'Ds\Stack' 堆栈跟踪:#0 {main} 在 C:\OSPanel\ 中引发第 2 行的域 \lab5.cd\index.php

$q = new SplStack();作品

我刚开始研究堆栈,我不明白为什么它不起作用=(如何解决它以及问题是什么

php
  • 1 个回答
  • 10 Views

Sidebar

Stats

  • 问题 10021
  • Answers 30001
  • 最佳答案 8000
  • 用户 6900
  • 常问
  • 回答
  • Marko Smith

    我看不懂措辞

    • 1 个回答
  • Marko Smith

    请求的模块“del”不提供名为“default”的导出

    • 3 个回答
  • Marko Smith

    "!+tab" 在 HTML 的 vs 代码中不起作用

    • 5 个回答
  • Marko Smith

    我正在尝试解决“猜词”的问题。Python

    • 2 个回答
  • Marko Smith

    可以使用哪些命令将当前指针移动到指定的提交而不更改工作目录中的文件?

    • 1 个回答
  • Marko Smith

    Python解析野莓

    • 1 个回答
  • Marko Smith

    问题:“警告:检查最新版本的 pip 时出错。”

    • 2 个回答
  • Marko Smith

    帮助编写一个用值填充变量的循环。解决这个问题

    • 2 个回答
  • Marko Smith

    尽管依赖数组为空,但在渲染上调用了 2 次 useEffect

    • 2 个回答
  • Marko Smith

    数据不通过 Telegram.WebApp.sendData 发送

    • 1 个回答
  • Martin Hope
    Alexandr_TT 2020年新年大赛! 2020-12-20 18:20:21 +0000 UTC
  • Martin Hope
    Alexandr_TT 圣诞树动画 2020-12-23 00:38:08 +0000 UTC
  • Martin Hope
    Air 究竟是什么标识了网站访问者? 2020-11-03 15:49:20 +0000 UTC
  • Martin Hope
    Qwertiy 号码显示 9223372036854775807 2020-07-11 18:16:49 +0000 UTC
  • Martin Hope
    user216109 如何为黑客设下陷阱,或充分击退攻击? 2020-05-10 02:22:52 +0000 UTC
  • Martin Hope
    Qwertiy 并变成3个无穷大 2020-11-06 07:15:57 +0000 UTC
  • Martin Hope
    koks_rs 什么是样板代码? 2020-10-27 15:43:19 +0000 UTC
  • Martin Hope
    Sirop4ik 向 git 提交发布的正确方法是什么? 2020-10-05 00:02:00 +0000 UTC
  • Martin Hope
    faoxis 为什么在这么多示例中函数都称为 foo? 2020-08-15 04:42:49 +0000 UTC
  • Martin Hope
    Pavel Mayorov 如何从事件或回调函数中返回值?或者至少等他们完成。 2020-08-11 16:49:28 +0000 UTC

热门标签

javascript python java php c# c++ html android jquery mysql

Explore

  • 主页
  • 问题
    • 热门问题
    • 最新问题
  • 标签
  • 帮助

Footer

RError.com

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

帮助

© 2023 RError.com All Rights Reserve   沪ICP备12040472号-5