其用例是带有单选按钮的响应式表单。在大 PC 屏幕上时,所有单选按钮通常都位于屏幕上的一行(就像带有 的非包装 Flex 容器中的 Flex 项目flex-direction: row)。在电话上,并非所有单选按钮通常都适合在一行上。如果任何一个单选按钮不适合,我希望它们都每行显示一个(就像带有 的 Flex 容器中的 Flex 项目flex-direction: column)。
如果我知道我的单选按钮标签有多长,这会很容易,但我不知道(它们来自客户端可配置数据库)。

所以我想要的是这样的:
<html>
<head>
<title>Responsive Radio Button</title>
<style type="text/css">
@media (min-width: 652px) {
.flexContainer {
display:flex;
flex-direction: row;
}
}
@media (max-width: 652px) {
.flexContainer {
display:flex;
flex-direction: column;
}
}
</style>
</head>
<body>
<div class='flexContainer'>
<div>Medium Length div</div>
<div>Short div</div>
<div>Longest div in this entire html page!</div>
</div>
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
我事先不知道@media (min-width: /max-width:)断点是什么。
<html>
<head> …Run Code Online (Sandbox Code Playgroud) 美人鱼声明文档中是否有一些可用选项的完整列表的文档:https: //mermaid.js.org/syntax/flowchart.html#styling-a-node和https://mermaid.js.org/语法/流程图.html#样式和类?
美人鱼文档中给出的示例:
flowchart LR
id1(Start)-->id2(Stop)
style id1 fill:#f9f,stroke:#333,stroke-width:4px
style id2 fill:#bbf,stroke:#f66,stroke-width:2px,color:#fff,stroke-dasharray: 5 5
Run Code Online (Sandbox Code Playgroud)
显示填充、描边、描边宽度等,但它不接受字体大小,也不接受我尝试过的其他 css 样式。
是否有一个列表包含可以遵循的完整列表style {nodeId}?
我想告诉 GraphQL 我的“serialNumber”字段是一个长度在 1 到 20 个字符之间的字符串。我知道要用!在模式中将字段设为必填,但我可以告诉 GraphQL 还有最大字段长度吗?
如果我为必需的字符串字段传递空值,GraphQL 将不会接受它。我希望当传递的字符串长度超过允许的最大长度时,它的行为方式相同。
我考虑过两种方法:1)向 schema.graphql 文件中的字段定义添加“maxlength”属性。或 2) 创建一个新类型并为其指定最大长度。
我找不到任何有关如何操作的信息。有可能吗?