js+css模拟手机调用前后摄像头调焦拍照效果代码

代码语言:html

所属分类:其他

代码描述:js+css模拟手机调用前后摄像头调焦拍照效果代码,点击摄像头切换按钮可调用本机摄像头进行拍照,调焦。

代码标签: js css 模拟 手机 调用 摄像头 调焦 拍照

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  

  
  
  
  
<style>
*,
*::before,
*::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100vh;
	background: radial-gradient(#9e9e9e, transparent);
}

video {
	height: 100%;
	width: 100%;
	object-fit: cover;
	transition: transform 0.4s;
	object-position: center;
}

.imageContainer {
	width: 380px;
	height: 95vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background-size: 100%;
	background-position: center;
	background-repeat: no-repeat;
	border: 6px solid #000;
	border-radius: 60px;
	position: relative;
	overflow: hidden;
	background: #000;
}

.imageContainerInner {
	width: 100%;
	height: 75vh;
	overflow: hidden;
	margin-top: -64px;
	position: relative;
}

.imageC.........完整代码请登录后点击上方下载按钮下载查看

网友评论0