Делаем подарки
This commit is contained in:
parent
63cc7ee533
commit
23dd65b366
20
presents.php
20
presents.php
@ -26,16 +26,18 @@ require_once 'functions.php';
|
|||||||
<link href="css/main.css" rel="stylesheet"/>
|
<link href="css/main.css" rel="stylesheet"/>
|
||||||
<script src="js/main.js"></script>
|
<script src="js/main.js"></script>
|
||||||
<style>
|
<style>
|
||||||
label.present > input{ /* HIDE RADIO */
|
label.present > input { /* HIDE RADIO */
|
||||||
visibility: hidden; /* Makes input not-clickable */
|
visibility: hidden; /* Makes input not-clickable */
|
||||||
position: absolute; /* Remove input from document flow */
|
position: absolute; /* Remove input from document flow */
|
||||||
}
|
}
|
||||||
label.present > input + img{ /* IMAGE STYLES */
|
|
||||||
cursor:pointer;
|
label.present > input + img { /* IMAGE STYLES */
|
||||||
border:2px solid transparent;
|
cursor: pointer;
|
||||||
|
border: 2px solid transparent;
|
||||||
}
|
}
|
||||||
label.present > input:checked + img{ /* (RADIO CHECKED) IMAGE STYLES */
|
|
||||||
border:2px solid #f00;
|
label.present > input:checked + img { /* (RADIO CHECKED) IMAGE STYLES */
|
||||||
|
border: 2px solid #f00;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
@ -70,12 +72,12 @@ if (!empty($_POST['present'])) {
|
|||||||
<div>
|
<div>
|
||||||
<?php
|
<?php
|
||||||
$dirname = "i/presents/";
|
$dirname = "i/presents/";
|
||||||
$images = glob($dirname."*.png");
|
$images = glob($dirname . "*.png");
|
||||||
|
|
||||||
foreach($images as $image): ?>
|
foreach ($images as $image): ?>
|
||||||
<label class="present">
|
<label class="present">
|
||||||
<input type="radio" name="present" value="<?= $image ?>">
|
<input type="radio" name="present" value="<?= $image ?>">
|
||||||
<img src="<?= $image ?>" alt=""><br />
|
<img src="<?= $image ?>" alt="">
|
||||||
</label>
|
</label>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user