我试图在一个网页上渲染两个图像,使每个图像均达到100%全屏显示。但是它们显示的非常小。我已经尝试了从样式到CSS的很多操作,但是图像的大小不会改变。
这是网页:
下面是我的代码:
import React from 'react'
import {connect} from 'react-redux'
import {Link} from 'react-router-dom'
import {getBeers} from '../store/allBeers'
import {
Button,
ButtonGroup,
ButtonToolbar,
Dropdown,
DropdownButton
} from 'react-bootstrap'
class AdminDash extends React.Component {
render() {
// console.log('before beer......', this.props.beers)
// const beers = this.props.beers
// console.log('beer variable......', beers)
return (
<div style={{border: 'solid 1px black', height: '100vh'}}>
<ButtonToolbar aria-label="Toolbar with button groups">
<ButtonGroup className="mr-2" aria-label="First group">
<Link to="/admin/dashboard">
<Button variant="outline-info">Admin Home Page</Button>
</Link>
</ButtonGroup>
<ButtonGroup className="mr-2" aria-label="Second group">
<Link to="/admin/edit/orders">
<Button variant="outline-info">Admin Order Management</Button>
</Link>
</ButtonGroup>
<ButtonGroup className="mr-2" aria-label="Second group">
<Link to="/admin/edit/users">
<Button variant="outline-info">Admin User Management</Button>
</Link>
</ButtonGroup>
<ButtonGroup className="mr-2" aria-label="Second group">
<Link to="/admin/post/beer">
<Button variant="outline-info">Create New Product</Button>
</Link>
</ButtonGroup>
<ButtonGroup className="mr-2" aria-label="Second group">
<Link to="/admin/edit/beer/3">
<Button variant="outline-info">Edit Existing Product</Button>
</Link>
</ButtonGroup>
<ButtonGroup aria-label="Third group">
<DropdownButton
variant="outline-info"
as={ButtonGroup}
title="Admin Product Management"
id="bg-nested-dropdown"
>
<Link to="/admin/post/beer">
<Dropdown.Item eventKey="1">Create New Product</Dropdown.Item>
</Link>
<Link to="/admin/edit/beer/3">
<Dropdown.Item eventKey="2">
Update Existing Product
</Dropdown.Item>
</Link>
</DropdownButton>
</ButtonGroup>
</ButtonToolbar>
<br />
{/* <img
id="dash-image-mock"
src="https://res.cloudinary.com/dejiqayjc/image/upload/v1569248053/fundus_pics/admindash_part1_kkgphi.png"
/>
<br />
<img
id="dash-image-mock"
src="https://res.cloudinary.com/dejiqayjc/image/upload/v1569248058/fundus_pics/admindash_part2_ikbsxd.png"
/> */}
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0"
/>
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Document</title>
</head>
<body>
<img src="https://res.cloudinary.com/dejiqayjc/image/upload/v1569248053/fundus_pics/admindash_part1_kkgphi.png" />
<br />
<br />
<br />
<img src="https://res.cloudinary.com/dejiqayjc/image/upload/v1569248058/fundus_pics/admindash_part2_ikbsxd.png" />
</body>
</html>
</div>
)
}
}
const mapState = state => {
return {
beers: state.allBeers
}
}
// const mapDispatch = (dispatch) => {
// return {
// fetchBeers: () => dispatch(getBeers)
// }
// }
export default connect(mapState)(AdminDash)
我在做什么错?