图片翻转作业

news/2025/1/15 9:06:28/

使用ps的切片工具划分切片为10×10,保存为jpeg格式

注册一个全局组件Vue.component,通过id值将数据绑定到template,使用props接受数据,设置v-show属性值为真,用methods来定义方法,取值相反

设置一个放图片的盒子,使用组件,用v-for遍历数组(图片),用item获取值,:(v-bind)绑定im值。设置模板,放置点击事件@click,设置图片的隐藏属性(v-show)

设置页面背景颜色和盒子的宽、边框、弹性布局、在主轴上换行显示、元素水平垂直距离相等、图片宽高、隐藏后颜色

实例化对象,返回数组,通excel的转置工具改为横向,用文本编辑工具将空格转换为','

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>body {background-color: rgb(253, 93, 93);}.content {border: 5px solid rgb(245, 238, 238);width: 1700px;margin: 0 auto;display: flex;flex-wrap: wrap;justify-content: space-between;align-content: space-between;}img {width: 160px;height: 107px;}.item {width: 160px;margin: 5px 0;background-color: rgb(238, 235, 69);height: 107px;}</style>
</head><body><div id="app"><div class="content"><cpn v-for="item in image" :im="item" :key="item"></cpn></div></div><template id="cpn"><div class="item" @click="btn"><img :src="im" v-show="show"></div></template>
</body>
<script src="./js/vue.js"></script>
<script>Vue.component("cpn", {template: "#cpn",props: {im: {type: String}},data() {return {show: true,}},methods: {btn() {this.show = !this.show}},})const app = new Vue({el: "#app",data() {return {image: ['./img/images_01.jpg', './img/images_02.jpg', './img/images_03.jpg', './img/images_04.jpg', './img/images_05.jpg', './img/images_06.jpg', './img/images_07.jpg', './img/images_08.jpg', './img/images_09.jpg', './img/images_10.jpg', './img/images_11.jpg', './img/images_12.jpg', './img/images_13.jpg', './img/images_14.jpg', './img/images_15.jpg', './img/images_16.jpg', './img/images_17.jpg', './img/images_18.jpg', './img/images_19.jpg', './img/images_20.jpg', './img/images_21.jpg', './img/images_22.jpg', './img/images_23.jpg', './img/images_24.jpg', './img/images_25.jpg', './img/images_26.jpg', './img/images_27.jpg', './img/images_28.jpg', './img/images_29.jpg', './img/images_30.jpg', './img/images_31.jpg', './img/images_32.jpg', './img/images_33.jpg', './img/images_34.jpg', './img/images_35.jpg', './img/images_36.jpg', './img/images_37.jpg', './img/images_38.jpg', './img/images_39.jpg', './img/images_40.jpg', './img/images_41.jpg', './img/images_42.jpg', './img/images_43.jpg', './img/images_44.jpg', './img/images_45.jpg', './img/images_46.jpg', './img/images_47.jpg', './img/images_48.jpg', './img/images_49.jpg', './img/images_50.jpg', './img/images_51.jpg', './img/images_52.jpg ', './img/images_53.jpg', './img/images_54.jpg', './img/images_55.jpg', './img/images_56.jpg', './img/images_57.jpg', './img/images_58.jpg', './img/images_59.jpg', './img/images_60.jpg', './img/images_61.jpg', './img/images_62.jpg', './img/images_63.jpg', './img/images_64.jpg', './img/images_65.jpg', './img/images_66.jpg', './img/images_67.jpg', './img/images_68.jpg', './img/images_69.jpg', './img/images_70.jpg', './img/images_71.jpg', './img/images_72.jpg', './img/images_73.jpg', './img/images_74.jpg', './img/images_75.jpg', './img/images_76.jpg', './img/images_77.jpg', './img/images_78.jpg', './img/images_79.jpg', './img/images_80.jpg', './img/images_81.jpg', './img/images_82.jpg', './img/images_83.jpg', './img/images_84.jpg', './img/images_85.jpg', './img/images_86.jpg', './img/images_87.jpg', './img/images_88.jpg', './img/images_89.jpg', './img/images_90.jpg', './img/images_91.jpg', './img/images_92.jpg', './img/images_93.jpg', './img/images_94.jpg', './img/images_95.jpg', './img/images_96.jpg', './img/images_97.jpg', './img/images_98.jpg', './img/images_99.jpg', './img/images_100.jpg'],}},})
</script></html>

http://www.ppmy.cn/news/781343.html

相关文章

PS制作表情包

表情包制作 素材&#xff1a; 效果图&#xff1a; 步骤详解&#xff1a; 将素材拖入PS中。处理岳云鹏照片&#xff1a; CtrlJ&#xff0c;复制一份。Ctrl Shift U&#xff1a;去色。如图&#xff1a; Ctrl L&#xff0c;使用色阶&#xff0c;调整色场。如图&#xff1a; L…

PS基础学习

PS基础学习****加粗样式 一、移动工具(快捷键 V) 打开一个照片图层是锁定的&#xff0c;如果需要移动变换需要CtrlJ复制图层即可&#xff1b; 选中所有图层&#xff1a;选中第一个图层Shift最后一个图层&#xff1b; CtrlT自由变换&#xff1a;旋转&#xff0c;翻转&#xff0c…

用PS制作矩阵

1、新建文档&#xff1a;ctrln 确定宽高&#xff0c;点击确定 2、点击矩形工具&#xff0c;绘制矩形框 3、复制所需个数图层&#xff1a;ctrlj 4、拖动矩形&#xff0c;拖动同时按住shift(确保与第一个矩形对齐) 5、回到图层位置&#xff0c;选中所有图层 6、在PS上方工具…

PS小总结

PS小总结–课堂笔记 1.ps分为菜单栏&#xff0c;工具栏&#xff0c;工作区&#xff0c;窗口 2.像素大小决定图片清晰度 3. ctrl /- 放大/缩小 4. alt鼠标指向要操作的图层&#xff0c;复制图层 5.自动选择 6. ctrlt 旋转 7.ps右下角创建组(文件夹)&#xff0c;可以将图层拖进组…

3d翻转 ios_ios按钮点击后翻转效果

上图先&#xff0c;图上是一个按钮&#xff0c;点击后旋转&#xff0c;代码是网上找到的&#xff0c;不过找到的时候直接复制下来不能用&#xff0c;稍微整理下&#xff0c;为和我一样水平的菜鸟观摩一下下。 (1)引入“QuartzCore.framework”库&#xff0c;头部引用。 #includ…

PS由浅入深

PS常用快捷键 返回 Ctrl Alt Z 撤销 Ctrl Z 保存 Ctrl S另存为 Ctrl Shift S结束选区 Ctrl D打组 Ctrl G拆组 Ctrl Shift G剪切 Ctrl X编辑图像 Ctrl T反选 Ctrl Shift I撤销 Ctrl Z关闭图像 Ctrl W关闭所有图像 Ctrl Alt W 如何制作一张瓢虫图片( 基础&am…

PS笔记1

一、存储文件 MAC&#xff1a;CmdS WINDOWS&#xff1a;CtrlS 二、放大/缩小 放大 MAC&#xff1a;Cmd加号() WINDOWS&#xff1a;Ctrl加号() 缩小 MAC&#xff1a;Cmd减号(-) WINDOWS&#xff1a;Ctrl减号(-) 用于放大或缩小当前窗口的画面大小。 三、复制图层 MAC&#xff…

ShaderForge - 纹理水平垂直翻转

shaderforge图&#xff1a; shaderforge代码&#xff1a; // Shader created with Shader Forge v1.38 // Shader Forge (c) Freya Holmer - http://www.acegikmo.com/shaderforge/ // Note: Manually altering this data may prevent you from opening it in Shader Forge /…