我正在开发一个项目,我应该在其中制作 div flash 的特定部分,(或只闪烁一次)
HTML :
<p style="color:#f47321; font-size:16px; font-weight:bold;" id="divtoBlink" >Current Price</p>
Run Code Online (Sandbox Code Playgroud)
和 CSS
<style>
#divtoBlink{
background: #008800;
animation-duration: 1000ms;
animation-name: blink;
animation-iteration-count: 1;
animation-direction: alternate;
}
@keyframes blink {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
</style>
Run Code Online (Sandbox Code Playgroud)
它闪烁,颜色变为绿色。但颜色保持绿色。我想background: #008800;再次将 重置为白色或透明。是否有我可以使用的属性或调整?任何帮助表示赞赏。
我有这种输入类型
<input class="btn btn-success" type="file" name="profile_image" style="margin-top:10px; margin-left:20px;"></input>
Run Code Online (Sandbox Code Playgroud)
用户将从此处添加图像文件,并使用PHP代码上传文件
if(isset($_FILES['profile_image']))
{
$image_type = $this->getImageType($_FILES['profile_image']);
if($image_type == 'image')
{
$extension = pathinfo($_FILES['profile_image']['name'], PATHINFO_EXTENSION);
$filename = '123_'.uniqid().'.'.$extension;
move_uploaded_file($_FILES['profile_image']['tmp_name'], '../functions/images/images/'.$filename);
}
}
else
{
$filename = 'default_profile_image.jpg';
}
Run Code Online (Sandbox Code Playgroud)
和 getImageType
public function getImageType($file)
{
$imageMime = getimagesize($file['tmp_name']);
$type = explode('/', $imageMime['mime']);
return $type[0];
}
Run Code Online (Sandbox Code Playgroud)
但它不会读取$_FILES['profile_image']而是移动到其他部分.为什么不读$ _FILES?有什么遗失?