Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

一、怎样才能让select里的内容居中显示? 二、表单输入框placeholder的文字能换行么? 三、怎么解决移动端与pc端之间的色差问题? #69

Open
yixiaosi1314 opened this issue Sep 23, 2021 · 1 comment

Comments

@yixiaosi1314
Copy link

No description provided.

@yixiaosi1314
Copy link
Author

一、怎样才能让select里的内容居中显示

    <select id="abc">
        <option value="1">你好吗</option>
        <option value="2">how are you</option>
        <option value="3">我很好,谢谢</option>
        <option value="4">I‘m fine,thanks</option>
    </select>
css
    #abc {
          width: 200px;
          height: 30px;
          text-align: center;
        }

二、表单输入框placeholder的文字能换行么

1.input输入框本身是单行的,因此不可以设置换行

2.textarea输入框的placeholder文字可以设置换行

由于字符串内不会转译/n和 <br/ >\ ,

<textarea name="" id="" cols="30" rows="10" placeholder="你好/n谢谢"></textarea>
<textarea name="" id="" cols="30" rows="10" placeholder="how are you<br/>I'm fine thsnks"></textarea>

我们可以通过&#13(回车),&#10(换行)来解决

<textarea name="" id="" cols="30" rows="10" placeholder="你好&#13谢谢"></textarea>
<textarea name="" id="" cols="30" rows="10" placeholder="how are you&#10 I'm fine thsnks"></textarea>

三、怎么解决移动端与pc端之间的色差问题?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant