background
程序员文章站
2022-06-28 08:15:16
按钮 背景 -
按钮 背景 <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/control3_1" android:state_enabled="true" android:state_focused="true" android:state_pressed="false"/> <item android:drawable="@drawable/control3_1" android:state_enabled="true" android:state_pressed="true"/> <item android:drawable="@drawable/control3_1" android:state_checked="true" android:state_enabled="true"/> <item android:drawable="@drawable/control3_0"/> </selector>
check_box 背景
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/check_true1" android:state_checked="true"></item>
<item android:drawable="@drawable/check_true1" android:state_selected="true"></item>
<item android:drawable="@drawable/check_false1"></item>
</selector>
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_checked="true" android:state_pressed="true" android:drawable="@mipmap/link_check" /> <item android:state_checked="false" android:state_pressed="true" android:drawable="@mipmap/link_uncheck" /> <item android:state_checked="false" android:drawable="@mipmap/link_uncheck" /> <item android:state_checked="true" android:drawable="@mipmap/link_check" /> </selector>
单背景色 <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <solid android:color="#3B87F6"/> <corners android:radius="6dp" /> </shape>
圆 背景色
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval" android:useLevel="false"> <solid android:color="@color/background9"/> <stroke android:width="1dp" android:color="@color/background9" /> <size android:width="48dp" android:height="48dp" /> </shape>
背景渐变色
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android"> <corners android:radius="12dp" /> <gradient android:angle="0" android:startColor="#3F9BF0" android:endColor="#1C71E6" /> </shape>
图片旋转
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <rotate android:drawable="@drawable/loading_icon" android:fromDegrees="0.0" android:pivotX="50.0%" android:pivotY="50.0%" android:toDegrees="360.0"/> </item> </layer-list>
单线条边框背景 <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <corners android:radius="10dp"/> <stroke android:width="1dp" android:color="@color/textcolor59" /> </shape>
本文地址:https://blog.csdn.net/qingchunqidewo/article/details/110518849
下一篇: SEO优化前景如何 还有继续的必要吗
推荐阅读
-
如何获取元素的最终background-color
-
纯css实现元素下出现横线动画(background-image)
-
CSS3中background-clip和background-origin的区别示例介绍
-
在css3中background-clip属性与background-origin属性的用法介绍
-
html+css-->background-img(背景图的设置)
-
background 背景图片 --css3
-
【转】通过css使用background-color为背景图添加遮罩效果
-
css中background和 background-color 同时使用的优先级
-
background 设置文本框背景图
-
JQuery获取样式中的background-color颜色值的问题