我想知道在HTML 5中屏蔽图像的最佳方法是什么?
事实上,我想在一个画廊中显示圆圈缩略图,而不用打扰我的客户准备圆形图片......
在我看来,我有两个选择:Canvas masking或老式方式
你有其他想法吗?最佳做法?
谢谢
我开发的wordpress小部件有问题.
它只是一个带有电子邮件字段,按钮和复选框的表单.
当用户点击提交时,我想验证是否勾选了复选框,如果是,则提交表单...
我的问题是表单提交甚至很难复选框没有勾选.页面重新加载.
这是我的代码的简短版本:
<?php if(isset($_POST['rules']) && $_POST['rules'] == 'Yes')
{
echo 'The checkbox was selected';
} else {
echo 'The checkbox wasn\'t selected';
} ?>
<form id="form-invite" method="post" action="">
<label>Your friend(s) email :</label>
<br/>
<small style="text-transform:uppercase;font-family:Arial;font-size:9px;color:#333;"<em>Multiple emails separated by comma.</em></small>
<input class="kolom" type="text" name="email" id="email"/>
<input class="button-primary classic-button" type="submit" name="send-them" value="Send Invitation"/>
<input type="checkbox" name="rules" value="Yes" /> <span id="rulesInfo">I read the Privacy Policy</span><br/>
<span id="emailInfo"></span>
</form>
Run Code Online (Sandbox Code Playgroud)