设置按钮的宽度只是稍微复杂一点:复制矩形的宽度并在元素中增加了一个单位,为矩形的边框留下位置。
Fixing the button's width is only slightly more complicated: the width is copied as is on the rectangle, but incremented by one unit on the element to leave room for the rectangle's stroke.
搜索框和按钮的宽度是190像素,这会设置logo的宽度。
The search box and button are 190 pixels wide, which sets the width for a logo.
您可以使用calculateButtonWidth 方法设置按钮的X坐标,方法是增加所有早先按钮的宽度。
Using calculateButtonWidth, you can determine the X coordinate of any particular button relative to the applet by adding the widths of all the previous buttons.
您可以使用calculateButtonWidth 方法设置按钮的X坐标,方法是增加所有早先按钮的宽度。
Using calculateButtonWidth, you can determine the X coordinate of any particular button relative to the applet by adding the widths of all the previous buttons.
应用推荐