나는 내 텍스트와 아이콘이 더 작게하고 싶습니다. 그들은 3 개의 셀마다 2 개의 행으로 나뉩니다. 또한 높이와 너비가 반응하고 사각형에서 사각형으로 변경되지 않도록하려면 어떻게해야합니까?두 테이블 행 사이에 공간을 작게 만드는 방법 css
@import url(https://fonts.googleapis.com/css?family=Fjalla+One);
html{
height: 100%;
}
body{
font-family: 'Fjalla One', sans-serif;
background: #2C3E50; /* fallback for old browsers */
background: -webkit-linear-gradient(to top, #4CA1AF, #2C3E50); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to top, #4CA1AF, #2C3E50); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}
.icon{
display: inline-block;
vertical-align: middle;
-webkit-transform: perspective(1px) translateZ(0);
transform: perspective(1px) translateZ(0);
box-shadow: 0 0 1px transparent;
-webkit-transition-duration: 0.3s;
transition-duration: 0.3s;
-webkit-transition-property: box-shadow, transform;
transition-property: box-shadow, transform;
display: table-cell;
vertical-align: middle;
color: white;
border: 2px solid black;
border-radius: 35px;
width: 180px;
height: 180px;
text-align: center;
background: #007991; /* fallback for old browsers */
background: -webkit-linear-gradient(to bottom, #78ffd6, #007991); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to bottom, #78ffd6, #007991); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}
.icon:hover, .icon:focus, .icon:active {
box-shadow: 0 50px 50px -50px rgba(0, 0, 0, 50);
-webkit-transform: scale(1.1);
transform: scale(1.1);
}
.icontext{
text-align: center;
color: white;
font-size: 30px;
}
table {
border-spacing: 60px;
border-collapse: separate;
}
<table align="center">
<tr>
<h1>
<td class="icon" id="afspraken">Icoon1</td>
<td class="icon">Icoon2</td>
<td class="icon">Icoon3</td>
</tr>
<tr>
<td class="icontext">Afspraken</td>
<td class="icontext">Grenzen</td>
<td class="icontext">Situaties</td>
</tr>
</table>
안녕, 도움에 대한 모든 감사의 첫 번째. 나는 아마 많은 실수가있는 초보자입니다. 그것을 업데이트하고 어떻게 작동하는지 알려 드리겠습니다. –
답변에서 코드를 업데이트했습니다. 컨텍스트를 볼 수 있도록 전체 코드가 필요하면 그냥 물어보십시오. 도움을 다시 주셔서 감사합니다 –
네, 그게 더 낫지 만 여전히 이상적은 아니에요. 이 아이콘과 icontext가 클릭되어 다른 페이지로 이동하게되면 링크 ('')가 가장 좋습니다. 내 업데이트 된 답변을 확인하십시오. 귀하가 볼 수있는 미리보기로 바뀌 었습니다. 보시다시피 여러분의 것처럼 보이지만 양식 입력 대신 링크 요소를 사용하면보다 의미 론적으로 정확 해집니다. –