找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 69|回复: 0

SOUI中使用shape创建带描边的按钮

[复制链接]
  • TA的每日心情
    慵懒
    4 天前
  • 签到天数: 74 天

    [LV.6]常住居民II

    104

    主题

    17

    回帖

    2252

    积分

    管理员

    积分
    2252
    发表于 2026-2-9 17:47:34 | 显示全部楼层 |阅读模式
    2026-02-09_174546.png

    skin.xml中定义


    <shape name="shp3" shape="rectangle">
                    <corners radiusX="20" radiusY="20" />
                    <solid color="#0000ff" />
                    <size width="100" height="100" />
            </shape>
            <shape name="shp4" shape="rectangle">
                    <corners radiusX="20" radiusY="20" />
                    <solid color="rgb(76,73,73)" />
                    <size width="100" height="100" />
                    <stroke color="rgb(103,101,101)" width="2" />
            </shape>



    xml中正常使用
    <button pos="-210,[10" size="96,32" colorText="#ffffff" skin="shp3" font="size:18">登录</button>
    <button pos="-105,{0" size="96,32" colorText="#ffffff" skin="shp4" font="size:18" >取消</button>

    即可实现上述效果。
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    Archiver|手机版|小黑屋|SOUI官方论坛

    GMT+8, 2026-3-6 13:42 , Processed in 0.064340 second(s), 24 queries .

    Powered by Discuz! X3.5

    © 2001-2025 Discuz! Team.

    快速回复 返回顶部 返回列表