RError.com

RError.com Logo RError.com Logo

RError.com Navigation

  • 主页

Mobile menu

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

Yaroslav Bondar's questions

Martin Hope
Yaroslav Bondar
Asked: 2022-04-18 23:08:15 +0000 UTC

BEM 与 SASS 混合

  • -1

出现了以下问题:您可以使用通用 BEM 类为块设置样式,例如:

<div class = 'parent'>
   <button class = 'button parent__button'> button </button>
</div>

.button {
   border: none;
   background: white;
 }
 .parent__button {
    position: relative;
 }

或者你可以在 SASS 中使用 mixin 或模板

@mixin button($border, $background) {
   border: $border;
   background: $background;
}
.parent__button {
   @include button(none, white);
}

然后 HTML 将如下所示,没有通用的通用按钮类:

<div class = 'parent'>
   <button class = 'parent__button'> button </button>
</div>

这样你就可以用 SASS mixin 或 SASS 模板替换 BEM 修饰符。这可以减轻 HTML 的负担并将其重定向到 CSS。

考虑到这两种方法,如何正确弥补?特别感兴趣的是一个有/有生产经验的人的回答,在这个问题的背景下,商业开发中使用了什么实践?将 BEM 应用于一般块或块元素样式,还是使用 mixin?感谢您参与这场战斗。

html
  • 1 个回答
  • 10 Views
Martin Hope
Yaroslav Bondar
Asked: 2021-12-09 00:00:36 +0000 UTC

如何使光滑的滑块响应?

  • 0

在布局的时候,问题就出现了,为什么在浏览器的开发者面板中改变窗口的宽度时,slic滑块没有改变宽度和列,以及切换幻灯片的箭头,爬出窗口浏览器本身。总之,现在它没有响应。同时,自适应起作用,也就是这个东西:

responsive: [
      {
        breakpoint: 1280,
        settings: {
          slidesToShow: 2,
          slidesToScroll: 2,
          infinite: true,
          dots: true
        }
      },
      {
        breakpoint: 600,
        settings: {
          slidesToShow: 2,
          slidesToScroll: 2
        }
      },
      {
        breakpoint: 480,
        settings: {
          slidesToShow: 1,
          slidesToScroll: 1
        }
      }

这是一个实际上没有响应的效果:

这是一个实际上没有响应的效果

HTML 滑块:

<div class="team__slider">
    <div class="team__card card">
        <div class="team__card-img-wrap card__img-wrap">
            <img class="team__card-img card_img" src="img/team/card_01.jpeg" alt="John">
        </div>
        <div class="team__card-text-wrap card__text-wrap">
            <h1 class="team__card-title card_title column-price__title-item">John Doe</h1>
            <p class="team__card-subtitle-1 card_subtitle-1">CEO & Founder, Example</p>
            <p class="team__card-subtitle-2 card_subtitle-2 subtitle-type-1">Harvard University</p>
        </div>
        <div class="team__card-links-wrap card-links-wrap">
            <a class="team__card-link card__link" href="#"><i class="fa fa-dribbble"></i></a>
            <a class="team__card-link card__link" href="#"><i class="fa fa-twitter"></i></a>
            <a class="team__card-link card__link" href="#"><i class="fa fa-linkedin"></i></a>
            <a class="team__card-link card__link" href="#"><i class="fa fa-facebook"></i></a>
        </div>                    
        <p class="team__card-button-wrap card__button-wrap"><button class="team__card-button card__button column-price__button">Contact</button></p>
    </div>
    <div class="team__card card">
        <div class="team__card-img-wrap card__img-wrap">
            <img class="team__card-img card_img" src="img/team/card_02.jpg" alt="John">
        </div>
        <div class="team__card-text-wrap card__text-wrap">
            <h1 class="team__card-title card_title column-price__title-item">David Jons</h1>
            <p class="team__card-subtitle-1 card_subtitle-1">Team Lead</p>
            <p class="team__card-subtitle-2 card_subtitle-2 subtitle-type-1">London University</p>
        </div>
        <div class="team__card-links-wrap card-links-wrap">
            <a class="team__card-link card__link" href="#"><i class="fa fa-dribbble"></i></a>
            <a class="team__card-link card__link" href="#"><i class="fa fa-twitter"></i></a>
            <a class="team__card-link card__link" href="#"><i class="fa fa-linkedin"></i></a>
            <a class="team__card-link card__link" href="#"><i class="fa fa-facebook"></i></a>
        </div>                    
        <p class="team__card-button-wrap card__button-wrap"><button class="team__card-button card__button column-price__button">Contact</button></p>
    </div>
    <div class="team__card card">
        <div class="team__card-img-wrap card__img-wrap">
            <img class="team__card-img card_img" src="img/team/card_03.jpg" alt="John">
        </div>
        <div class="team__card-text-wrap card__text-wrap">
            <h1 class="team__card-title card_title column-price__title-item">Artem Kravetz</h1>
            <p class="team__card-subtitle-1 card_subtitle-1">PR Manager</p>
            <p class="team__card-subtitle-2 card_subtitle-2 subtitle-type-1">Kiev University</p>
        </div>
        <div class="team__card-links-wrap card-links-wrap">
            <a class="team__card-link card__link" href="#"><i class="fa fa-dribbble"></i></a>
            <a class="team__card-link card__link" href="#"><i class="fa fa-twitter"></i></a>
            <a class="team__card-link card__link" href="#"><i class="fa fa-linkedin"></i></a>
            <a class="team__card-link card__link" href="#"><i class="fa fa-facebook"></i></a>
        </div>                    
        <p class="team__card-button-wrap card__button-wrap"><button class="team__card-button card__button">Contact</button></p>
    </div>
</div>

滑块 CSS:

    .team__slider {
    display: flex;
    justify-content: space-between;
    margin: 90px 0 0 0;
}
.team__card {
    flex: 30.33333% 0 0;
    background: #d8d8d8;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    margin: 0 20px;
}
.team__card-img {
    /* width: 300px;
    height: 300px; */
    width: 100%;
    /* height: 50%; */
    height: 275px;
    object-fit: cover;
}
.card-links-wrap {
    display: flex;
    margin: 40px auto 40px auto;
    justify-content: space-between;
    width: 64%;
}
.team__card-link {
    display: block;
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: 0px 7px 5px rgba(0, 0, 0, 0.5);
    transition: 0.5s;
    color: black;
}
.team__card-link:hover {
    transform: rotate(0deg) skew(0deg) translate(0, -10px);
}
.team__card-link:nth-child(1):hover {
    background: #f082ac;
}
.team__card-link:nth-child(2):hover {
    background: #0084b4;
}
.team__card-link:nth-child(3):hover {
    background: #C32AA3;
}
.team__card-link:nth-child(4):hover {
    background: #3b5998;
}
.team__card-link:hover.team__card-link .fa {
    color: #ffffff;
}
.team__card-link .fa {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 22px;
}
.card__link {
    text-decoration: none;
}
.card__button {
    border: none;
    outline: 0;
    cursor: pointer;
}
.team__card-title {
    text-transform: capitalize;
    margin-top: 24px;
    font-size: 29px;
}
.team__card-subtitle-1 {
    font-size: 18px;
    letter-spacing: 1px;
    font-weight: 600;
    font-family: "Open Sans Semibold";
    text-transform: uppercase;
    color: #6a6a6a;
    text-align: center;
}
.team__card-subtitle-2 {
    text-align: center;
}
.team__card-button-wrap {
    margin: 0;
}
.team__card-button {
    width: 100%;
    padding: 15px 0 15px 0;
    background: #999999;
    transition: opacity .3s;
    font-size: 18px;
    letter-spacing: 0px;
    font-weight: 600;
    font-family: "Open Sans Semibold";
}
.team__card-button:hover {
    opacity: 0.7;
}

滑块 JS:

$(document).ready(function() {
  $('.team__slider').slick({
    slidesToShow: 3,
    slidesToScroll: 1,
    // autoplay: true,
    autoplaySpeed: 3000,
    dots: true,
    adaptiveHeight: true,
    // infinite: false,

    responsive: [
      {
        breakpoint: 1280,
        settings: {
          slidesToShow: 2,
          slidesToScroll: 2,
          infinite: true,
          dots: true
        }
      },
      {
        breakpoint: 600,
        settings: {
          slidesToShow: 2,
          slidesToScroll: 2
        }
      },
      {
        breakpoint: 480,
        settings: {
          slidesToShow: 1,
          slidesToScroll: 1
        }
      }
      // You can unslick at a given breakpoint now by adding:
      // settings: "unslick"
      // instead of a settings object
    ]

  });
});
javascript
  • 1 个回答
  • 10 Views
Martin Hope
Yaroslav Bondar
Asked: 2020-07-05 22:01:46 +0000 UTC

关于滑块组织的一般问题

  • 0

你好,我是刚开始补上经验,下面有一个训练落地部分,它以滑块的形式组织,部分左侧的条纹清楚地表明了这一点,所以我仍然不清楚这个滑块类型滚动浏览背景或内容部分,标题为我们的服务。可能更多地向已经排版过此类情况的经验丰富的排版员提出问题。我将不胜感激有关如何在哪个方向键入的详细答案。

在此处输入图像描述

вёрстка
  • 1 个回答
  • 10 Views
Martin Hope
Yaroslav Bondar
Asked: 2020-06-30 21:15:58 +0000 UTC

跨浏览器兼容,相同代码不同块显示

  • 0

有 2 个浏览器,因此在其中布局时块的不同显示:

阻止显示第一个浏览器 Mozilla Firefox 68.3.0esr(64 位):

Mozilla 火狐 68.3.0esr

第二个 Chromium块映射:80.0.3987.163(官方构建)(64 位) :

Chromium:80.0.3987.163(官方版本)(64 位)

此块的代码:

.popular__wrapper {
  max-width: 978px;
  margin: 0 auto;
  padding: 0 15px;
  position: relative;
}

.popular__button {
  position: absolute;
  /* left: 204px; */
  left: 20.86%;
  /* top: 154px; */
  top: 11.51%;
}

.popular__button-text {
  margin-bottom: 10px;
}

.popular__header {
  display: flex;
  justify-content: end;
  width: 100%;
  /* margin-bottom: 100px; */
  margin-bottom: 10.48%;
}

.popular__header-container {
  width: 48.21%;
}

.popular__header-title {
  /* margin-bottom: 50px; */
  margin-bottom: 12%;
  /* width: 100%; */
}

.popular__header-title-text {
  word-wrap: break-word;
}

.popular__header-text {
  width: 100%;
}
<div class="popular__wrapper">
  <div class="popular__button button">
    <div class="popular__button-text button__text">
      <a href="#" class="popular__button-text button__text">full shop</a>
    </div>
    <div class="popular__button-img button__img">
      <a href="#" class="popular__button-text button__text"><img src="img/button/01.svg" alt="arrow"></a>
    </div>
  </div>
  <header class="popular__header header">
    <div class="popular__header-container">
      <div class="popular__header-title header__title">
        <h1 class="popular__header-title-text header__title-text"><span class="header__title-color">popular</span><br>watch</h1>
      </div>
      <div class="popular__header-text  header__text">
        Breguet's philosophy can be defined as a tireless process of creative search and implementation of innovations, the desire to always be one step ahead of its era and at the same time strictly comply with the technical and aesthetic standards developed
        by A.L. Breguet and laid the foundations of modern watchmaking.
      </div>
    </div>
  </header>
</div>

任务:在所有浏览器中显示块,因为它在第一个浏览器中显示。

вёрстка
  • 1 个回答
  • 10 Views
Martin Hope
Yaroslav Bondar
Asked: 2020-06-26 05:44:51 +0000 UTC

如何使按钮在响应式布局中与整个内容成比例地改变其位置?

  • 0

在此处输入图像描述

**在 1280 x 721 px 的布局分辨率下,发现按钮的位置正确,但是当屏幕宽度改变时,它的位置不正确:**

在此处输入图像描述

如何使按钮在响应式布局中与整个内容成比例地改变其位置

.main-screen__clients-area {
  position: relative;
  width: 100%;
  /* display: flex;
     justify-content: space-between; */
}

.main-screen__clients {
  /* width: 30.78%; */
  float: left;
  width: 138px;
}

.main-screen__row-clients div:first-child {
  margin-bottom: 31px;
}

.main-screen__clients-title {
  color: #FFFFFF;
  opacity: 0.9;
  margin-bottom: 12px;
}

.main-screen__clients-subtitle {
  color: #FFFFFF;
  opacity: 0.5;
}

.main-screen__button {
  position: absolute;
  /* left: 28%;
            top: 31%; */
  left: 28.8%;
  right: 71.2%;
  top: 67.5%;
}

.main-screen__img-area {
  float: right;
  width: 62.2%;
  min-height: 221px;
  /* min-height: 284px; */
  background: url("../img/main-screne/item.png") no-repeat center center;
  background-size: 100% 100%;
}
<div class="main-screen__clients-area">
  <div class="main-screen__clients">
    <div class="main-screen__row-clients">
      <div class="main-screen__clients-column">
        <p class="main-screen__clients-title clients__title">
          100+
        </p>
        <p class="main-screen__clients-subtitle clients__subtitle">
          famous clients all over the world
        </p>
      </div>
      <div class="main-screen__clients-column">
        <p class="main-screen__clients-title clients__title">
          300+
        </p>
        <p class="main-screen__clients-subtitle clients__subtitle">
          years we help our clients to keep track of time
        </p>
      </div>
    </div>
    <!-- <div class="main-screen__row-clients"> -->

    <!-- </div> -->
  </div>
  <div class="main-screen__button button">
    <div class="main-screen__button-text button__text">
      discover
    </div>
    <div class="main-screen__button-img button__img">
      <img src="img/button/01.svg" alt="arrow">
    </div>
  </div>
  <div class="main-screen__img-area">
    <!-- <a href="#"><img src="img/main-screne/item.jpg" alt="watch" class="main-screen__img-item" width="396" height="221"></a> -->
  </div>
</div>

вёрстка
  • 1 个回答
  • 10 Views
Martin Hope
Yaroslav Bondar
Asked: 2020-06-16 05:39:50 +0000 UTC

如何键入带有图像作为字母背景的文本[重复]

  • 0
这个问题已经在这里得到了回答:
仅在文本上叠加背景 2 个答案
2年前关闭。

实际上,你怎么能在布局中写出这样的铭文,有一个带图片的背景(字母) 在此处输入图像描述

html
  • 1 个回答
  • 10 Views
Martin Hope
Yaroslav Bondar
Asked: 2020-05-24 16:21:07 +0000 UTC

如何在响应式布局中显示菱形

  • 0

**由于菱形,您需要确保切换设备工具栏(设备模拟器)右侧没有缩进。切换设备工具栏外没有填充,部分菱形向右移动而不显示**

在此处输入图像描述

在此处输入图像描述

   <section class="about">
        <div class="wrapper">
            <header class="about__title-block">
                <h2 class="about__title title">About us</h2>
                <div class="about__subtitle subtitle">For nearly twenty-five years, SolarBox has developed,
                     implemented and financed sustainable focus 
                    that recapture and reinvest otherwise lost resources.
                </div>                 
            </header>

.about {
    width: 100%;
    position: relative;
    padding: 118px 0 153px 0;
    background: #252525;
    /* padding-top: 20%;
    padding-bottom: 20%; */
}
.about__title-block {
    /* width: 856px; */
    width: 66.2%;
    height: 525px;
    /* height: 100%; */
    background: #EF3527;
    /* Shadow 25px 00 */
    box-shadow: 0px 0px 25px rgba(0, 0, 0, 0.25);
}
.about__title {
    /* width: 22.76%; */
    width: 34.425%;
    margin: 0px 0 43px 10.28%;
    padding-top: 130px;
}
.about__title::after {
   content:"";
   display: block;
   /* width: 59.19px; */
   width: 25.57%;
   height: 5px;
   background: #FFA630;
   margin-top: 42px;
}
.about__subtitle {
    /* margin: 0 0 0 88px; */
    margin-left: 10.28%;
    /* width: 463px;     */
    width: 54.19%;
    /* height: 120px; */
    height: auto;
    color: #FFFFFF;
}
.about__img {
    position: absolute;
    /* top: 64px; */
    /* left: 661px; */
    top: 8%;
    left: 51.1%;
    /* width: 525px; */
    /* height:  525px;  */
    width: 30.67%;
    height: 525px;;
    background: url("../img/about/about-img.png") center center no-repeat;
    /* background-size: cover; */
    background-size: 100% 100%;
    border-radius: 5px;
    /* z-index: 34; */
}
.about__figure {
    display: none;
    position: absolute;
    width: 32.533%;
    height: 57%;
    /* width: 420px;  */
    /* height: 420px;  */
    /* left: 1011px;
    top: 1295.54px; */
    top: 27.5%;
    left: 72.6%;
    border: 20px solid #FFA630;
    box-sizing: border-box;
    box-shadow: 0px 0px 100px rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    transform: rotate(-31.35deg);
    z-index: 0.1;
}
            <div class="about__figure"></div>
            <div class="about__img"></div>
        </div>
    </section>
html
  • 1 个回答
  • 10 Views
Martin Hope
Yaroslav Bondar
Asked: 2020-05-13 23:32:47 +0000 UTC

当前画廊元素的布局

  • 0

需要使用 html 和 css 显示图片库的当前元素,如带有“眼睛”的图片

.gallery__row {
  display: flex;
  flex-direction: row;
}

.gallery__column {
  display: flex;
  flex-direction: row;
}

.gallery__current:hover {
  position: relative;
  background: linear-gradient(0deg, rgba(52, 84, 122, 0.8), rgba(52, 84, 122, 0.8)), url(../img/gallery/02.jpeg);
  z-index: -2;
}
<div class="gallery__img">
  <div class="gallery__row">
    <div class="gallery__column">
      <img src="img/gallery/01.png" width="480" height="480" alt="01">
      <div class="gallery__current"><img src="img/gallery/02.jpeg"             width="480" height="480" alt="02"></div>
      <img src="img/gallery/01.png" width="480" height="480" alt="01">

    </div>
  </div>
</div>

有必要使用 html 和 css 在悬停时显示当前画廊元素,如图所示

html
  • 1 个回答
  • 10 Views
Martin Hope
Yaroslav Bondar
Asked: 2020-05-09 16:35:37 +0000 UTC

如何用内框制作这样的背景图片?

  • 0

在此处输入图像描述

任务是用内部框架制作这样的背景,链接到布局https://www.figma.com/file/SB9yy4U3zdpzxaxjEpguHw/Sofi-de-Marko?node-id=178%3A2

html
  • 2 个回答
  • 10 Views
Martin Hope
Yaroslav Bondar
Asked: 2020-04-30 13:19:40 +0000 UTC

哪些方法可以实现布局?

  • 1

可以使用什么方法来制作这样一个带有文本和底部箭头的块的显示?

图片

html
  • 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