<%@ page contentType="text/html;charset=UTF-8" language="java" %> <html> <head> <meta charset="UTF-8"> <title>首页</title> <style type="text/css"> body { background-image: url("ts.jpg"); } 给图片设个长度和宽度
时间: 2023-10-10 08:07:52 浏览: 101
在给图片设定长度和宽度之前,你需要在<img>标签中添加相应的属性。你可以使用width属性来设置图片的宽度,使用height属性来设置图片的高度。例如:
<img src="ts.jpg" width="200" height="150">
这样就会将图片的宽度设置为200像素,高度设置为150像素。请注意,这里的单位是像素。你可以根据需要调整宽度和高度的数值。
#### 引用[.reference_title]
- *1* *2* [解释JSP文件的声明及属性,<%@ page language=“java” contentType=“text/html; charset=UTF-8” ...](https://blog.csdn.net/King_wq_2020/article/details/118650230)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>](https://blog.csdn.net/Stephen__Xu/article/details/78234828)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文