小编C.R*_*ldo的帖子

100vh不占整个屏幕

我想创建一个滚动页面,就像每个部分都是从屏幕全高.

但是当我使用100vh时,它不需要整个屏幕高度,但更像是95%.

这是链接:http://i283951.iris.fhict.nl/stack/例如.

和屏幕:http://postimg.org/image/rc9g3sykh/

PS:第一节显示100vh罚款,接下来的部分是问题.

css

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

如何使用其他类型的Google字体?

我想使用不同类型(浅色,黑色,半粗体)的Google字体。

这是Google字体的链接:https : //fonts.googleapis.com/css?family=Exo+2 : 300,400,600,900

常规工作正常,font-family: 'Exo 2';但是我想知道如何使用浅色,黑色的。我尝试了Exo 2 Black / Light,但似乎没有用。

我也阅读了文档,但是也没有答案。

css fonts

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

React img 显示 [object Module] 而不是图像

最近,我将我的项目推送到了 Gitlab,这样我也可以在我的笔记本电脑上处理它来练习我的 React。在我拉出并 npm 安装了所有东西之后(不得不使用npm audit fix --force这很奇怪),我尝试运行它。一切看起来都很好,但图像不会显示,当我检查它时,它显示[对象模块]。现在我已经用谷歌搜索了它,大多数答案都提到了将选项更改为

options: {
      esModule: false,
    },
Run Code Online (Sandbox Code Playgroud)

在网络包中

问题是,我认为我从未使用过 webpack,并且在我的桌面上它工作正常(我没有 webpack.config.js)。这是我的 package.json,与我的笔记本电脑上的相同:

{
  "name": "test",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.3.2",
    "@testing-library/user-event": "^7.1.2",
    "axios": "^0.19.2",
    "bootstrap": "^4.5.0",
    "cors": "^2.8.5",
    "node-sass": "^4.14.1",
    "react": "^16.13.1",
    "react-dom": "^16.13.1",
    "react-scripts": "3.4.1",
    "react-select": "^3.1.0"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not …
Run Code Online (Sandbox Code Playgroud)

reactjs

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

如何使渐变在其他 div 中继续

我希望我的渐变传递到下一个 div。将一个带有渐变的 div 放在它们后面可能会起作用,但是在我的网站上,这些元素并不完全相邻

.row {
  clear: both;
}

.portrait {
  width: 200px;
  height: 200px;
  background-color: red;
  float: left;
}

.photo {
  width: 200px;
  height: 150px;
  background-color: blue;
}

.gradient {
  width: 200px;
  height: 50px;
  background-color: green;
}
Run Code Online (Sandbox Code Playgroud)
<div class="row">
  <div class="portrait">
    <div class="photo"></div>
    <div class="gradient"></div>
  </div>
  <div class="portrait">
    <div class="photo"></div>
    <div class="gradient"></div>
  </div>
  <div class="portrait">
    <div class="photo"></div>
    <div class="gradient"></div>
  </div>
</div>

<div class="row">
  <div class="portrait">
    <div class="photo"></div>
    <div class="gradient"></div>
  </div>
  <div class="portrait">
    <div class="photo"></div>
    <div class="gradient"></div>
  </div>
  <div class="portrait"> …
Run Code Online (Sandbox Code Playgroud)

css

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

标签 统计

css ×3

fonts ×1

reactjs ×1