小编Ром*_*ман的帖子

为什么我在材质-ui-v3.2.0 "Image avatars" 示例中看不到图像

这个示例“图像头像” https://material-ui.com/demos/avatars/来自material-ui v3.2.0网站,但不知何故我在实现时看不到图像。

为什么我在material -ui-v3.2.0“图像头像”示例中看不到图像?

在示例中'icon avatars''Letter avatars'我可以看到图像。我使用create-react-app 'react-scripts': '^2.0.4', but also tried on 'react-scripts': '^1.1.5'但没有任何效果。

PFB 代码如下:

import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { withStyles } from '@material-ui/core/styles';
import Avatar from '@material-ui/core/Avatar';

const styles = {
  row: {
    display: 'flex',
    justifyContent: 'center',
  },
  avatar: {
    margin: 10,
  },
  bigAvatar: {
    width: 60,
    height: 60,
  },
};

function ImageAvatars(props) {
  const { …
Run Code Online (Sandbox Code Playgroud)

html reactjs material-ui jss

5
推荐指数
1
解决办法
5467
查看次数

标签 统计

html ×1

jss ×1

material-ui ×1

reactjs ×1