css怎么做打勾的方框

html-css011

css怎么做打勾的方框,第1张

这个得用Html做的

<form action="" method="get">

您喜欢的水果?<br />

<label><input name="Fruit" type="checkbox" value="0" />苹果 </label>

<label><input name="Fruit" type="checkbox" value="1" />桃子 </label>

<label><input name="Fruit" type="checkbox" value="2" />香蕉 </label>

<label><input name="Fruit" type="checkbox" value="3" />梨 </label>

</form>

<html>

<head>

<meta charset='utf-8'>

<title>标题</title>

</head>

<body>

<style>

.show{

border-width: 0 0 1px 0

border-style: solid

border-color: black

}

</style>

<div class='show'>只显示下边框</div>

</body>

</html>

详细用法可以参考以下页面:css设置div只显示某一边的边框

您好,要使下边框border左边有距离右边顶对齐,首先要在CSS中使用margin属性,margin属性可以让您控制元素的外边距,以便让元素与其他元素保持一定的距离。您可以使用margin-right属性来设置元素右边的边距,以便让元素与右边的元素保持一定的距离。例如,您可以使用以下代码来设置border左边的距离:

border-left: 200px

margin-right: 200px

这样,border左边就会有200px的距离,而右边的元素也会有200px的距离