我想实现这个功能:动态添加多个按钮到scrollview,如果scrollview超过一定高度,它会自动diplay滚动条.
你能给我一些建议吗?
我们在这个页面上的Facebook按钮没有显示/显示的问题:
http://powertextblog.esvelte.net/
似乎生成的span和iframe具有宽度的内联样式:0px和height:0px,我试过覆盖它无济于事.
该按钮未在任何浏览器中显示.
这是我们在页面上使用的代码(来自AddThis)来生成按钮.
<a class="addthis_button_facebook_like" fb:like:layout="button_count" addthis:url="http://www.facebook.com/PowerText"></a>
Run Code Online (Sandbox Code Playgroud)
我也尝试使用Facebook自己的按钮生成器插入Facebook like按钮,但同样的问题出现(这表明它不是AddThis问题)
任何帮助,将不胜感激.
我有兴趣制作一个类似于https://new.myspace.com/主页上的html按钮.我知道html看起来像这样:
<button class="button" id="join">Join</button>
Run Code Online (Sandbox Code Playgroud)
虽然我不确定css应该是什么样的.我知道网上有很多关于html按钮的教程,但我不确定半矩形按钮.谢谢,哈里森
我正在使用带有4个按钮的相对布局(在中间,一个在另一个之下).
我的问题是调整所有按钮之间的间隙,所以所有按钮之间的差距都是一样的.
我想根据屏幕的高度动态地做它(我使用Display类来获得实际高度).
最好的方法是什么?
谢谢,
Amigal
我radioButtons在使用qt设计器制作的表单中有两个,我现在用pyqt编程.我希望在选择lineEdit1时将文本更改为"radio 1",radioButton并在选择2时将其更改为"radio 2" radioButton.我该怎么做到这一点?
我有这个问题:

我想在标题中保留4-5行文本,以便价格和"添加到购物车"按钮对齐.
我能做什么?现在我有这个:
.product-grid {
margin-bottom:15px;
margin-left:auto;
margin-right:auto;
width:auto;
text-align:center;
}
.product-grid .item-box {
float:left;
text-align:center;
vertical-align:text-top;
padding:5px;
}
.product-grid .item-box:hover {
background:#F9F9F9;
}
.product-grid .product-item {
text-align:center;
width:177px;
height:350px;
margin:0;
padding:0;
}
*.product-grid .product-item .product-title** {
font-weight:700;
font-size:12px;
font-family:Ubuntu, Helvetica, Arial, sans-serif;
padding:0;
}
.product-grid .product-item .product-title a {
display:block;
height:auto;
line-height:1.3em;
overflow:hidden;
font-family:Ubuntu,Helvetica, Arial, sans-serif;
padding:4px 10px 8px 0;
}
.product-grid .product-item .picture {
text-align:center;
height:177px;
}
.product-grid .product-item .picture img {
position:relative;
vertical-align:middle;
border-radius:5px;
border:1px solid #eee; …Run Code Online (Sandbox Code Playgroud) 我有一个按钮,没有任何只有背景颜色的文字.如果onClick()按钮我需要设置没有xml规格的按钮边框.我尝试使用渐变矩形作为drawable按钮的背景,这对我的布局来说不灵活.
如何为按钮设置特定颜色的边框?
这是我的代码.
Button btnBlackColor=new Button(this);
int mButtonWidth=100;
btnBlackColor.setWidth(mButtonWidth);
btnBlackColor.setHeight(mButtonWidth);
btnBlackColor.setBackgroundColor(Color.BLACK);
btnBlackColor.setOnClickListener(new OnClickListener()
{
public void onClick(View v)
{
GradientDrawable btnShape = new GradientDrawable(Orientation.BOTTOM_TOP, new int[]{Color.BLUE,Color.LTGRAY});
btnShape.setCornerRadius(0);
btnShape.setSize(mButtonWidth, mButtonWidth);
btnShape.setBounds(10, 10, mButtonWidth, mButtonWidth);
ClipDrawable btnClip = new ClipDrawable(btnShape, Gravity.LEFT,ClipDrawable.HORIZONTAL);
btnShape = new GradientDrawable(Orientation.BOTTOM_TOP, new int[]{Color.BLACK, Color.DKGRAY});
btnShape.setCornerRadius(0);
btnShape.setSize(mButtonWidth, mButtonWidth);
btnShape.setBounds(5, 5, mButtonWidth, mButtonWidth);
LayerDrawable btnLayer= new LayerDrawable(new Drawable[]{btnShape, btnClip});
btnBlackColor.setBackgroundDrawable(btnLayer);
}
});
Run Code Online (Sandbox Code Playgroud) 我有5个简单的按钮,我希望它们像单选按钮一样,但没有勾选框(或者他们称之为的任何东西).它们在行中对齐,我只希望一次选择其中一个,当选择一个按钮时,它必须保持其选定的样式.我的布局代码如下所示:
<Button
android:id="@+id/button1"
android:layout_width="150dp"
android:layout_height="fill_parent"
android:layout_alignParentTop="true"
android:layout_margin="0dp"
android:text="@string/mybutton1" />
<Button
android:id="@+id/button2"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/button1"
android:text="@string/mybutton2" />
// and so on
Run Code Online (Sandbox Code Playgroud)
我的代码:
mybtn1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mybtn1.setPressed(true);
}
});
Run Code Online (Sandbox Code Playgroud)
所以,我不知道我是否可以在布局或代码中执行此操作.当我点击按钮时,有没有办法让按钮保持在选定状态(和选定的样式)?此外,是否可以将事件分配给所有这些按钮?
谢谢!
我想在d3中创建几个按钮.为了有一个更清晰的代码我想在数组中添加他们的名字.
我有以下代码,但它不起作用:
var buttonNames = ["button 1", "button 2", "button 3", "button 4"]
d3.select("body").selectAll("input").data(buttonNames).enter().append("input").attr("type","button").attr("class","button").attr("value", function d(){return d;} )
Run Code Online (Sandbox Code Playgroud)
在此先感谢您的回复.
我正在为我的学校开发一个基于CSS的手机,平板电脑和桌面版本的网络应用程序.我正在使用媒体查询.该应用程序几乎完成,它几乎可以在所有浏览器和Android上正常工作.该应用程序在Iphone/Ipad上看起来很棒但是按钮不起作用使得这些设备中的应用程序无用.
这就是我所拥有的:
//Source code
<div id="signinbutton" class="blue_button">Sign In</div>
//desktop.CSS
.blue_button {
width: 130px;
height: auto;
padding: 8px;
margin: 0% auto 20% auto;
background-image:url(../../images/bluebar5.png);
color: #FFF;
text-align: center;
font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
font-size: 14pt;
font-weight: bolder;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
cursor: default;
}
.blue_button:hover {
opacity: 0.7;
}
//Handheld.css (this overwrites css on desktop)
.blue_button {
width: 260px;
font-size: 18pt;
background-image:url(../../images/bluebar6.png);
}
Run Code Online (Sandbox Code Playgroud)
我尝试将样式应用于#signinbutton但没有成功.