是否有一个等同于android提示的CSS?

是否有一个等同于android提示的CSS?,第1张

概述在Android布局xml文件中,可以执行以下 *** 作…<EditTextandroid:id="@+id/username"android:layout_width="fill_parent"android:layout_height="wrap_content"android:hint="@string/username"/><EditTextandroid:id=&

在Android布局xml文件中,可以执行以下 *** 作…

<EditText androID:ID="@+ID/username"    androID:layout_wIDth="fill_parent"    androID:layout_height="wrap_content"    androID:hint="@string/username" /><EditText androID:ID="@+ID/password"    androID:layout_wIDth="fill_parent"    androID:layout_height="wrap_content"    androID:inputType="textPassword"    androID:hint="@string/password" />

这导致GUI看起来像这样:

如何使用CSS为HTML表单创建相同的效果?

解决方法:

您可以使用占位符HTML5属性,例如:

<input type="text" name="username" placeholder="Username" /><input type="text" name="password" placeholder="Password" />

大多数浏览器都与此功能兼容,Internet Explorer除外(请参阅jcater的评论).例如,您可以使用jquery-placeholder添加对旧版浏览器的支持(甚至是ie6!).

总结

以上是内存溢出为你收集整理的是否有一个等同于android提示的CSS?全部内容,希望文章能够帮你解决是否有一个等同于android提示的CSS?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1106068.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-28
下一篇 2022-05-28

发表评论

登录后才能评论

评论列表(0条)

保存