如何将文本与 ons-select 对齐?

How to align text with ons-select?

我有这个 HTML 片段:

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="https://unpkg.com/onsenui/css/onsenui.css">
    <link rel="stylesheet" href="https://unpkg.com/onsenui/css/onsen-css-components.min.css">
    <script src="https://unpkg.com/onsenui/js/onsenui.min.js"></script>
    <script src="https://unpkg.com/jquery/dist/jquery.min.js"></script>
</head>
<body>
    <p>
        Label for select:&nbsp;
        <ons-select id="any_id" modifier="material">
            <option value="0">Value 0</option>
            <option value="1">Value 1</option>
            <option value="2">Value 2</option>
        </ons-select>
    </p>
</body>
</html>

产生这个:

如您所见,文本未与 ons-select 正确对齐。如何让它们显示在一行上?

对这种类型的东西使用 flexbox。很容易实现。

div{
display:flex;
align-items:center;
}
<html>
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="https://unpkg.com/onsenui/css/onsenui.css">
    <link rel="stylesheet" href="https://unpkg.com/onsenui/css/onsen-css-components.min.css">
    <script src="https://unpkg.com/onsenui/js/onsenui.min.js"></script>
    <script src="https://unpkg.com/jquery/dist/jquery.min.js"></script>
</head>
<body>
   <div>
      Label for select:&nbsp;   
     
        <ons-select id="any_id" modifier="material">
            <option value="0">Value 0</option>
            <option value="1">Value 1</option>
            <option value="2">Value 2</option>
        </ons-select>
    </div>
</body>
</html>