Open oMhuAaN opened 3 years ago
How to achieve:
When the word width less than container width motionless.
Automatically moves when the text width is larger than the container width.
Can you show me what settings you are using on the component, and what your items are, so that I can test it on my side.
I use the React+Material-ui { "name": "material-app", "version": "0.1.0", "private": true, "dependencies": { "@material-ui/core": "^4.11.2", "@material-ui/icons": "^4.11.2", "@material-ui/lab": "^4.0.0-alpha.57", "@testing-library/jest-dom": "^5.11.4", "@testing-library/react": "^11.1.0", "@testing-library/user-event": "^12.1.10", "clsx": "^1.1.1", "fontsource-roboto": "^4.0.0", "http-proxy-middleware": "^1.0.6", "react": "^17.0.1", "react-dom": "^17.0.1", "react-marquee-master": "^1.4.3", "react-redux": "^7.2.2", "react-router-dom": "^5.2.0", "react-scripts": "4.0.1", "redux": "^4.0.5", "redux-saga": "^1.1.3", "web-vitals": "^0.2.4" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, "eslintConfig": { "extends": [ "react-app", "react-app/jest" ] }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] }, "homepage": "./" }
怎样实现: 当文字宽度小于容器宽度时静止不动, 当文字宽度大于容器宽度时自动移动。