# screen-area-selection **Repository Path**: putiwan/screen-area-selection ## Basic Information - **Project Name**: screen-area-selection - **Description**: web端屏幕区域选择工具,主要用于区域选择,配合webrtc部分功能可实现视频录制,截图等功能 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-09-09 - **Last Updated**: 2025-09-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 说明 这是一个屏幕区域选择提示工具,不包含截图,录制视频等功能。 只是引入后,在网页内显示一个区域选择窗口。 具体业务逻辑代码需要手动编写。 # 效果如下 # 使用方法 html + javascript ``` html ``` # 参数说明 ``` javascript initScreenAreaAelection(document.body, // 渲染的根元素 { width: 500, // 默认宽度 height: 500, // 默认高度 left: 0, // 默认左侧距离 top: 0, // 默认顶部距离 borderWidth: 1.5, // 边框宽度 borderColor: "#999", // 边框颜色 borderType: "dashed", // 边框类型 blockColor: "#000", // 上下左右四个角的颜色 blockSize: 6, // 上下左右四个角的大小 contentBgColor: 'unset', // 中间区域的背景色 contentHoverBgColor: 'rgba(0,0,0,0.1)', // 鼠标放上后中间区域的背景色 text: '按下后可拖拽位置,松开后结束。', // 中间区域显示提示文字 textSize: 8, // 中间区域文字池逊 textColor: 'white', // 文字颜色 screenLimiter: true, // 是否可以溢出屏幕尺寸 autoHide: false, // 是否自动隐藏 autoHideTims: 1 // 自动隐藏时间 单位(秒) }) ```