【发布时间】:2015-07-15 17:39:54
【问题描述】:
我正在使用cakephp 3 制作一个搜索表单,我必须使用单选按钮。
我不知道如何用 php 制作它们。这是我目前所拥有的:
input[type=radio] + label:before {
display: inline-block;
vertical-align: middle;
margin: -2px 8px 0 0;
height: 23px;
width: 23px;
border-radius: 50%;
border: 2px solid #777;
background-color: #fff;
background-clip: padding-box;
content: "";
transition: box-shadow .01s .39s ease-in-out, background .4s ease-in-out;
}
input[type=radio]:checked + label:before {
box-shadow: inset 0 0 0 2px #fff;
border: solid #F44336;
background-color: #F44336;
transition: background .4s ease-in-out;
}
<div class="col-sm-3 text-center">
<input type="radio" name="radio" id="radio1" value="1">
<label for="radio1">Product Shots</label>
</div>
<div class="col-sm-3 text-center">
<input type="radio" name="radio" id="radio3" value="3">
<label for="radio3">Video</label>
</div>
<div class="col-sm-3 text-center">
<input type="radio" name="radio" id="radio2" value="2">
<label for="radio2">Printing Materials</label>
</div>
标签旁边的单选按钮没有出现:
<div class="col-sm-3 text-center">
<?= $this->Form->input('multimedia_type_id', ['type' => 'radio',
'name' => 'radio',
'label' => false,
'options' => $multimediaTypes
]); ?>
</div>
【问题讨论】:
标签: php html css cakephp-3.0