顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶

啊说法萨芬所发生的

<iframe width="100%" height="300" src="https://c.runoob.com/iframe/4417" allowfullscreen="allowfullscreen" frameborder="0"></iframe>

顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶

顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶

<!doctype html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>demo</title>
<style>
.rad-prg{
position: relative;
}
.rad-con{
position: absolute;
z-index: 1;
top:0;
left: 0;
text-align: center;
width:90px;
height: 90px;
padding: 10px;
font-family: "microsoft yahei";
}
</style>
</head>
<body>
<div  id="loaddingSpan">

</div>
<script type="text/javascript" src="jquery.min.js"></script>

<script>
var opts = {
  lines: 11 // The number of lines to draw
, length: 30 // The length of each line
, width: 20 // The line thickness
, radius: 51 // The radius of the inner circle
, scale: 0.5 // Scales overall size of the spinner
, corners: 1 // Corner roundness (0..1)
, color: '#000' // #rgb or #rrggbb or array of colors
, opacity: 1 // Opacity of the lines
, rotate: 0 // The rotation offset
, direction: 1 // 1: clockwise, -1: counterclockwise
, speed: 1 // Rounds per second
, trail: 56 // Afterglow percentage
, fps: 20 // Frames per second when using setTimeout() as a fallback for CSS
, zIndex: 2e9 // The z-index (defaults to 2000000000)
, className: 'spinner' // The CSS class to assign to the spinner
, top: '50%' // Top position relative to parent
, left: '50%' // Left position relative to parent
, shadow: false // Whether to render a shadow
, hwaccel: false // Whether to use hardware acceleration
, position: 'absolute' // Element positioning
}
var target = document.getElementById('loaddingSpan')
var spinner = new Spinner(opts).spin(target);

</script>
</body>
</html>


顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶

要动态生成部对齐的 Checkbox,可以使用以下代码: ```java LinearLayout linearLayout = findViewById(R.id.linear_layout); // 获取线性布局 for (int i = 0; i < 5; i++) { // 循环生成 Checkbox CheckBox checkBox = new CheckBox(this); // 创建 Checkbox checkBox.setText("选项 " + (i + 1)); // 设置 Checkbox 的文本 checkBox.setButtonDrawable(R.drawable.checkbox_top); // 设置 Checkbox 的样式 LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT ); // 创建布局参数 layoutParams.gravity = Gravity.TOP; // 设置布局参数的对齐方式为部对齐 linearLayout.addView(checkBox, layoutParams); // 将 Checkbox 添加到线性布局中,并设置布局参数 } ``` 其中,`checkbox_top` 是你定义的 Checkbox 的部对齐样式,可以在 `drawable` 文件夹下创建一个名为 `checkbox_top.xml` 的文件,文件内容如下: ```xml <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/checkbox_checked" android:state_checked="true" android:state_pressed="false"/> <item android:drawable="@drawable/checkbox_unchecked" android:state_checked="false" android:state_pressed="false"/> <item android:drawable="@drawable/checkbox_checked_pressed" android:state_checked="true" android:state_pressed="true"/> <item android:drawable="@drawable/checkbox_unchecked_pressed" android:state_checked="false" android:state_pressed="true"/> </selector> ``` 这个文件定义了 Checkbox 的四种状态:选中未按下、未选中未按下、选中按下和未选中按下,对应的样式分别为 `checkbox_checked`、`checkbox_unchecked`、`checkbox_checked_pressed` 和 `checkbox_unchecked_pressed`。你可以根据自己的需要修改这些样式。 这段代码会生成 5 个部对齐的 Checkbox,每个 Checkbox 的文本分别为“选项 1”、“选项 2”、“选项 3”、“选项 4”和“选项 5”,并将它们添加到 LinearLayout 中。你可以根据自己的需要修改循环次数和 Checkbox 的文本。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值