ICode9

精准搜索请尝试: 精确搜索
  • uniapp上传图片2022-08-22 22:03:12

    1、 getUploadImg(e) { uni.chooseImage({ count: 9, // 默认9 sizeType: ['compressed'], sourceType: ['album', 'camera'], success: (res) => { // 图片的本地临时文件路径列表 this.tempFilePaths = res.tempFilePaths;

  • React hooks 实现图片懒加载useLazyLoad2022-06-21 00:31:09

    定义useLazyLoad 思路: 判断图片在视口内就加载,即: 元素距离页面顶部的距离offsetTop < 滚动条高度scrollTop + 视口高clientHeight import { useCallback, useEffect, useState } from 'react' import { ImgDOMListType, ImageListType } from '../components/LazyLoadDemo' import

  • Vue移动端图片放大预览(可全屏,可滑动)2022-05-19 19:04:02

    需求:微信公众号上的图片点击可以实现放大预览 我的项目中,微信公众号上的图片和其他内容是来自后台接口,(管理平台上用百度编辑器Editor添加的)   如何实现: 图片是根据接口渲染出来的,那么就先找到这些图片,然后再给图片绑定click事件,点击的时候进行预览   实现过程: 最开始我想到的是v

  • 多张图图片随机展示,且在第一轮随机中每个图片都能展示出来2022-03-18 21:05:51

    使用闭包实现YYDSexport function RandomMascot() { const imgList = ['1', '2', '3']; let newList = imgList.slice(0); const imgUrl = function () { let data; if (newList.length === 1) { data = newList[0]; newLi

  • 仿三星-鼠标移入与移出动画(Html+Css+Js)2021-12-16 14:04:01

      实现的功能: 鼠标移入切换对应图片,并自身改变样式 可以自己增加过渡动画,会更舒服些。 上代码: <!DOCTYPE html> <html lang="zh-cn"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> &

  • 图片轮播(定时器)JS+CSS32021-11-24 23:00:39

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> *{ margin:0; padding:0; } #outer{ width:610px; height:470px; mar

  • React实现图片自适应2021-11-04 11:06:52

    数据格式 [1xxxx,2xxxx,3xxxx,4xxxx,5xxxx,6xxxx,7xxxx,8,xxxx,9xxxx] 运行效果   代码部分 <div gutter={24} style={ { width: '100%', display: 'flex', justi

  • semi-supervised2021-11-04 10:00:00

    1.给无标签数据进行标记 def get_pseudo_labels(dataset, model, threshold=0.7): # 给6786个无标签数据标记 # This functions generates pseudo-labels of a dataset using given model. # It returns an instance of DatasetFolder containing images whose pred

  • 轮播图练习2021-10-10 18:59:31

     案例 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> *{ margin: 0; padding: 0; } /* * 设置outer的样式 */ #outer{

  • JS练习_鼠标移入显示大图2021-09-21 12:36:27

    演示: 源码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>随鼠标显示大图</title> <style> .picture-list img{ width: 320px; height: 160px

  • flutter_swiper:Another exception was thrown: ScrollController attached to multiple scroll views.2021-09-13 01:01:56

    Another exception was thrown: ScrollController attached to multiple scroll views. 翻译一下:引发了另一个异常:ScrollController连接到多个滚动视图。 Flutter Swiper是一个轮播图组件,内部包含一个Widget List,当这个Widget List数量大于1,就可能会有这种情况 解决方案:给Swiper加

  • 小程序上传图片,放大,删除。2021-08-11 13:33:12

    前言:    小程序里面上传照片,可以删除,可以放大查看,最多上传8张(张数限制可以自己修改)   上代码: <!-- 上传照片 star --> <view class="ops ops_img"> <view class="ops_title">照片(限制上传8张)</view> <!-- 图片上传列表 star --> <vie

  • 5.页面绘制-主题列表页(使用ColorUI、uni-app官方组件)2021-07-01 19:05:07

    1.主题列表页 1.导入ColorUI 绘制主题列表页,需要用到ColorUI。 uni-app插件市场中ColorUI的页面: https://ext.dcloud.net.cn/plugin?id=239 将ColorUI下载解压后,将colorui文件夹复制到项目wwab目录下:    在App.vue中加入代码: @import "colorui/main.css"; @import "colorui/

  • js轮播图,带导航2021-06-27 10:06:52

    <!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=d

  • 图片上传-阿里云oss2021-05-25 21:59:08

    <template> <div> <!-- <button>选择图片上传</button> multiple 多选 accept:接受图片格式--> <label for="upload" class="choose-img" :class="{upLoading: isUploading}">选择图片上传</label> <i

  • vue对数组带下标的修改,页面监控不到的问题2021-04-23 16:02:25

    <template> <div class="test"> <div> <div v-for="(item,index) in imgList.one" :key="item"> {{item}} <div @click="deleteClick('one',index)&q

  • js定时器2021-02-14 19:58:50

    <script type="text/javascript"> // 1.显示图片 class ShowPic{ imgList constructor(){ this.imgList = document.querySelector('.imgList') } setNum(n){ // 0 1 2 3 // 0% 25% 50% 75% let per = n/

  • wpf简单的轮播图2021-01-22 13:29:03

    <UserControl x:Class="CustomControl.UserControl.LbtCtrl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns

  • 【uniapp】轮播图图片适配2021-01-05 11:58:12

    需求:轮播图需要根据图片的大小进行适配,下面的文字跟随轮播图大小进行适配移动 逻辑: ①在swiper里的图片加载完成的时候,@load方法去获取图片的宽高,又因为图片的宽高需要适配手机的屏幕,所以需要用uni.getSystemInfoSync()获取可使用窗口的宽度,根据比例计算出图片的高度和sw

  • python 读取文件夹下的图片并显示2020-12-01 11:03:36

    项目下的image文件夹里有五张.bmp图像     1 import os 2 import cv2 3 4 def get_img_list(dir, firelist, ext=None): 5 newdir = dir 6 if os.path.isfile(dir): # 如果是文件 7 if ext is None: 8 firelist.append(dir) 9

  • 原生JS实现一个瀑布流插件2020-11-28 21:33:33

    瀑布流布局中的图片有一个核心特点 —— 等宽不定等高,瀑布流布局在国内网网站都有一定规模的使用,比如pinterest、花瓣网等等。那么接下来就基于这个特点开始瀑布流探索之旅。   基础功能实现 首先我们定义好一个有 20 张图片的容器, <body> <style> #waterfall { posi

  • 图片等比例缩放2020-11-14 18:03:15

    1 // 当前窗口的高度 2 var windowWidth = parseInt(375); 3 4 // 图片数据 5 var imgList = [ 6 { 7 url: '1.png', 8 width: 750, 9 height: 1186 10 }, 11 { 12 url: '2.png', 13 width: 500, 14

  • 小程序循环点击某个使用js更改css样式2020-07-08 13:36:09

    //wxml <block wx:for="{{Listsimg}}" wx:key='unique'> <block wx:if="{{index == clickId}}"> <view class="img" style="border:{{border}};box-shadow:{{borders}}" id="{{index}}&quo

  • Python实现简单网页图片抓取完整代码实例2020-05-25 12:02:18

    @本文来源于公众号:csdn2299,喜欢可以关注公众号 程序员学府 这篇文章主要介绍了Python实现简单网页图片抓取完整代码实例,具有一定借鉴价值,需要的朋友可以参考下。 利用python抓取网络图片的步骤是: 1、根据给定的网址获取网页源代码 2、利用正则表达式把源代码中的图片地址过

  • js 随机图片2020-05-09 13:04:50

    # 原理:用数组保存地址,随机序号获取图片 var imglist=new Array; //声明数组 imglist[0]="https://image1.jpg"; //存储 imglist[1]="https://image2.jpg"; imglist[2]="https://image3.jpg"; var imgchoice=Math.floor(M

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有