web-前端小实验6

实现以上图片中的内容

代码

html 复制代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>搜索框</title>
    <style>
        .search-container {
    display: flex;
    align-items: center;
    border: 2px solid red;
    border-radius: 5px;
    padding: 5px;
    width: 1000px;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 5px;
    font-size: 16px;
}

.search-button {
    background-color: red;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    margin-left: 5px;
    cursor: pointer;
}

.camera-button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    margin-left: auto;
    padding: 5px;
}

.camera-button img {
    width: 20px;
    height: 20px;
}
    </style>
</head>
<body>
    <div class="search-container">
        <input type="text" class="search-input" placeholder="小白熊恒温调奶器">
        <button class="camera-button">
            <img src="F:\web-前端\屏幕截图 2025-01-12 153808.png" alt="相机图标">
        </button>
        <button class="search-button">搜索</button>
    </div>
</body>
</html>

运行结果如图:

相关推荐
铁皮饭盒39 分钟前
成为AI全栈 - 第4课:Drizzle ORM SQLite Elysia 数据库实战
前端·后端
ascarl201042 分钟前
Linux.do 帖子整理:AI 调用 Chrome DevTools 调试前端页面
linux·前端·人工智能
DanCheOo1 小时前
开源 | 我是怎么用 ai-memory 让 Cursor 每次开新对话都自动知道项目背景的
前端·人工智能·ai·ai编程
MPGWJPMTJT1 小时前
告别手动切换 Node 版本:从 nvm 迁移到 Volta
前端
Apifox1 小时前
Apifox 近期更新|AI Agent Debugger、A2A Debugger、Postman API 导入、Ask AI 侧边栏对话
前端·人工智能·后端
嗷o嗷o2 小时前
Android 前台服务为什么越来越难用了?很多问题不是限制多,而是你任务模型就不该用 FGS
前端
摇滚侠2 小时前
软件开发外包项目组,如何提高代码质量和开发效率
java·开发语言·前端·ide·intellij-idea
卷帘依旧2 小时前
Promise链式调用原理
前端·javascript
光影少年2 小时前
react 单向数据流理解
前端·react.js·掘金·金石计划
万少2 小时前
可以免费使用的 DeepSeek-V4-Flash,很多人还不知道!
前端