小编Die*_*ona的帖子

带有css网格的水平滚动

当我尝试在网格完成四列时进行水平滚动时遇到问题。看

#series {
    display: grid;
    grid-gap: 16px;
    overflow-x: scroll;
    padding: 16px;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-flow: column;
}
Run Code Online (Sandbox Code Playgroud)

使用这个我得到低于输出

在此处输入图片说明

但是,你知道,我想要像“四列”和一个滚动条一样查看更多。

有什么问题。

html css reactjs css-grid next.js

11
推荐指数
2
解决办法
1万
查看次数

为什么我收到“元素类型无效:需要一个字符串(对于内置组件)或一个类/函数(对于复合组件)...”?

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. 当我尝试从 NextJs 应用程序中的 React-Icons 导入图标时遇到了这个问题。

请参阅下面的我的代码。

import React from "react";

import MdPlayCircleOutline from "react-icons";

const Podcast = props => {
  return (
    <div className="podcast">
      <div className="podcastName">
        <h4>{props.title}</h4>
      </div>

      <MdPlayCircleOutline />
    </div>
  );
};

export default Podcast;
Run Code Online (Sandbox Code Playgroud)

为什么这个?

html reactjs next.js

3
推荐指数
1
解决办法
896
查看次数

标签 统计

html ×2

next.js ×2

reactjs ×2

css ×1

css-grid ×1