ios - 使用 Pixate Freestyle 在 UIButton 上填充不起作用

标签 ios css pixate

我对 Xcode 中的 Pixate Freestyle 完全陌生,在试验它时,我无法在 UIButton 上使用任何填充。背景颜色、边框和边框半径等其他属性都可以使用,但填充似乎没有任何作用。

为了向按钮添加填充,我需要做些什么吗?还是按钮根本无法填充?

我正在使用 Xcode 7.0.1 和最新版本的 PixateFreestyle。

谢谢! :)

最佳答案

觉得需要用background-padding 可以看documentation here

例如,以视频为指导,我可以制作一个样式如下的按钮:enter image description here

但是如果我设置 background-padding: 50px; 它将显示如下: enter image description here

如果您使用的是负值,您应该记住按钮不会变得比 Storyboard或 .xib 中设置的框架大。

我使用的 CSS 是:

.btn-green {
    color :#446620;
    background-color:linear-gradient(#87c44a,#b4da77);
    border-width: 2px;
    border-color:#000000;
    border-style: solid;
    border-radius:10px;
    font-size: 13px;
    background-padding: 50px;
}

关于ios - 使用 Pixate Freestyle 在 UIButton 上填充不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36510256/

相关文章:

javascript - 单击图像区域可更改该区域的颜色

css - Ons-List-Item 自动高度调整

ios - 每个 View Controller 一个 pixate 样式表?

objective-c - iOS dispatch_async 和 NSURLConnection 委托(delegate)函数未被调用

iOS swift : Transition Animation on same View Controller

html - 如何设置表格td的底线

android - Pixate 按钮阴影 Android

ios - Pixate 可以为 UIAlertView 设置样式吗?

ios - UITableViewCell 外观不改变 textLabel 字体

iphone - 如何使用ASIHttpRequest创建请求,如下所示?