我一直在尝试使用CSS Grid,并坚持找到最有效的方法,让文本环绕一个<div>元素,该元素部分位于另外两个<div/>元素之上.基本上,就像在下面的图像中,我希望红色和蓝色div中的文本环绕黄色div,该黄色div部分位于其他两个元素的列和行中.显然,这是一个基于网格的布局,所以我对使用典型的浮点数做这件事并不感兴趣.如何使用CSS Grid实现此效果?
这是我的CSS和HTML:
.grid {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-template-rows: 1fr 1fr 1fr 1fr;
grid-gap: 10px;
}
.red {
background-color: red;
grid-column: 1 / span 2;
grid-row: 1 / span 4;
}
.blue {
background-color: blue;
grid-column: 3 / span 2;
grid-row: 1 / span 4;
}
.yellow {
background-color: yellow;
grid-column: 2 / span 2;
grid-row: 2 / 4;
}Run Code Online (Sandbox Code Playgroud)
<div class="grid">
<div class="red">According to the Oxford English Dictionary, hello is …Run Code Online (Sandbox Code Playgroud)我已经尝试了Github问题中的所有内容,错误描述和此问题,但均无济于事。
这是我的package.json:
{
"name": "MyAppName",
"version": "0.1.0",
"private": true,
"devDependencies": {
"jest-expo": "^24.0.0",
"react-native-scripts": "1.8.1",
"react-test-renderer": "16.2.0"
},
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"scripts": {
"start": "react-native-scripts start",
"eject": "react-native-scripts eject",
"android": "react-native-scripts android",
"ios": "react-native-scripts ios",
"test": "node node_modules/jest/bin/jest.js --watch"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"core-js": "^2.5.3",
"expo": "^24.0.2",
"react": "^16.2.0",
"react-native": "^0.51.0",
"react-native-awesome-alerts": "^1.0.3",
"react-native-barcode-builder": "^1.0.2",
"react-native-communications": "^2.2.1",
"react-native-hyperlink": "^0.0.11",
"react-native-image-pan-zoom": "^2.0.16",
"react-native-image-zoom-viewer": "^2.0.18",
"react-native-open-maps": "^0.1.1",
"react-native-swiper": "^1.5.13",
"react-native-vector-icons": "^4.4.2",
"react-navigation": "^1.0.0-beta.22",
"rn-viewpager": "^1.2.9"
} …Run Code Online (Sandbox Code Playgroud) 是否可以将 VS Code 终端字体更改为非等宽字体?
我尝试使用的字体是Melso LG L Regular for Powerline.
当我尝试更改terminal.integrated.fontFamily用户设置时,我得到以下信息:
有没有办法解决?
提前致谢
“ react-native”和“ Apache Cordova”之间的技术区别是什么?
我已经在Cordova上工作了一段时间了,它的工作方式是,它创建一个webview(无头浏览器)并在其中运行具有各种API访问权限的应用程序。我一直想知道“反应本地”是否同样如此。“ react-native”是否还会创建Webview?还是将javascript代码转换为本地代码?
如果它创建像Cordova这样的“ webview”,那么“ Cordova + React”应用程序和“ react-native”应用程序(不包括react-native提供的本机组件)之间有什么区别?
我知道这里已经存在针对此类问题的答案:电话缺口与React Native。但是我的问题有点不同。谢谢。