gpt4 book ai didi

html - 在左表上对齐图像?

转载 作者:行者123 更新时间:2023-11-28 00:04:12 25 4
gpt4 key购买 nike

下面的代码,当我在 HTML 编辑器上查看它并在 Web 浏览器中预览它时,两个图像都在左侧并且彼此重叠。我想在右边放一张图片,在左边放一张图片,并在中间放上文字“帮助我们改善我们为社区服务的方式”。我将如何实现这一点?

即"IMAGE1"帮助我们改进服务社区的方式 "IMAGE2"

<div class="survey-title">
<table>
<tbody>
<tr align="right">
<td style="width: 40px !important;">
<div id="uploadImage">
<img style="display: inline;" id="imgPreview" src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5OjcBCgoKDQwNGg8PGjclHyU3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3N//AABEIAH0AawMBIgACEQEDEQH/xAAbAAACAwEBAQAAAAAAAAAAAAAAAwIEBQEGB//EADsQAAICAQEEBwQHBwUAAAAAAAECAAMEERIhMUEFE1FhcZGhIjJSgQYUFSNCYrEkU8HC0eHwMzRygpL/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8A+4whCAQhCAQhCAQMDM7IufKufHocpUm661Tv1+Be/tPLx4A6/PqrsNNavdcONdQ2iPHkPmROUZlrZApyMfqiylk+8Da6aa66cOI7ZCsJRUK6ECIPwiJw/vulbG5U1hNfzNvPps+cDVhCEAhCEAhCEAhCLuvqoQvdYlaD8TsAPWAyEpfauBxGVWw7V3jzEdRl42Tr9Xvqt047Dg6QI9IXtj4rvWAbDoqA8CxOg9SIlUTFoShGJCjex4seJJ7ydTK30lOSuHW+IyrYlgbaZSwGgOmoAJ46cp5+rG6X6Rf9pvssB36Ipqr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4CQdQdJpY+cxcW7SpkAAEt7toHJu/sPLvmUzaRmInW3AMdEX2nbsA3kwPW4eT9ZrLFCjKdllJB0OmvHnxliUeh0ZcTrHBVrWNhX4deA+Q0EvQCcYagg852EDz9lRxchsfT2Tq9J7uJX5cR3a9k4G3cZr9IYgyqdASti+0jjipHCYo2nLgrs3J/q1jl+Ydqn0gTJkW3wGhhugQIi2WWAjt7tZM4a347B0gU3XdEvLr1NpuGsrNTYx0VGJ8IFNjv0E1sLDPsYpGr2gPf+VOS/M+g75ynEGEEuvXrL23U0c2PaewDmZudG4hx6y1jbd9h2rX+I/07O6BbUBVAHATsIQCEIQCUs7AXIK21u1WQnuWJxEuwgYbpmo2l2Bj5H563NeviN8Pq/SGQNlKKMReba7beu79ZuQgY69AYr78prMhu2xtfTlJN9Hujxvpq6luTVHZPmJrQgYZwM/FcGi5MhB+C4b//AEP46xgfpNzs14eNQfjZy+ny0E2IQKOH0eKbGvvsa7Ib3rG/Qdg7pehCAQhCB//Z"
alt="Logo1" title="Logo1">
</div>
</td>
</tr>


<tr align="right">
<td style="width: 40px !important;">
<div id="uploadImage">
<span style="float:left;"></span>
<img style="display: inline;" id="imgPreview" src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5OjcBCgoKDQwNGg8PGjclHyU3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3N//AABEIAH0AawMBIgACEQEDEQH/xAAbAAACAwEBAQAAAAAAAAAAAAAAAwIEBQEGB//EADsQAAICAQEEBwQHBwUAAAAAAAECAAMEERIhMUEFE1FhcZGhIjJSgQYUFSNCYrEkU8HC0eHwMzRygpL/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAA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jixncvLpwcSzJyDoiDXvPYB3zI6IrtzLm6UzRpZYPuU/dpy/z+sDQwcV0LZGU23k2e8fh7hLTNIlotngddpXdp13iLHgRd5XeydseV3aBsYz+1gW9jPUe7Ua/yzanmMB+srfFL7BbRqnP4XB1U+Ym/hZIyKQxGw4OzZWeKMOIP+bxvgWIQhAJlOOp6Tdfw3ptj/ku4+hHlNWZX0jovt6Otswjs5dSlqW79CP46QPN52T9v9P/AFGs7WBgNraeVlnZ+o+R7Z6NSFUAcBMD6L9HfZfRdVTENa46x3G/aLb+PhoPlNragNLxbNIlotmgcdoixpJzEtAW7axRMYYthA4CQdQdJpY+cxcW7SpkAAEt7toHJu/sPLvmUzaRmInW3AMdEX2nbsA3kwPW4eT9ZrLFCjKdllJB0OmvHnxliUeh0ZcTrHBVrWNhX4deA+Q0EvQCcYagg852EDz9lRxchsfT2Tq9J7uJX5cR3a9k4G3cZr9IYgyqdASti+0jjipHCYo2nLgrs3J/q1jl+Ydqn0gTJkW3wGhhugQIi2WWAjt7tZM4a347B0gU3XdEvLr1NpuGsrNTYx0VGJ8IFNjv0E1sLDPsYpGr2gPf+VOS/M+g75ynEGEEuvXrL23U0c2PaewDmZudG4hx6y1jbd9h2rX+I/07O6BbUBVAHATsIQCEIQCUs7AXIK21u1WQnuWJxEuwgYbpmo2l2Bj5H563NeviN8Pq/SGQNlKKMReba7beu79ZuQgY69AYr78prMhu2xtfTlJN9Hujxvpq6luTVHZPmJrQgYZwM/FcGi5MhB+C4b//AEP46xgfpNzs14eNQfjZy+ny0E2IQKOH0eKbGvvsa7Ib3rG/Qdg7pehCAQhCB//Z"
alt="Logo2" title="Logo2">
<td>

<div type="text" id="survey-name" class="survey-name survey-headers survey-name-image" placeholder="Untitled Survey" disabled="true" title="Help us improve how we serve the best community" aria-label="Help us improve how we serve the community">Help us improve how we serve the community</div>
</td>
</tr>
</tbody>
</table>
</div>

最佳答案

您必须在单个 tr 中使用 3 个 tds。就像这个例子:

<div class="survey-title">
<table>
<t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pGr2gPf+VOS/M+g75ynEGEEuvXrL23U0c2PaewDmZudG4hx6y1jbd9h2rX+I/07O6BbUBVAHATsIQCEIQCUs7AXIK21u1WQnuWJxEuwgYbpmo2l2Bj5H563NeviN8Pq/SGQNlKKMReba7beu79ZuQgY69AYr78prMhu2xtfTlJN9Hujxvpq6luTVHZPmJrQgYZwM/FcGi5MhB+C4b//AEP46xgfpNzs14eNQfjZy+ny0E2IQKOH0eKbGvvsa7Ib3rG/Qdg7pehCAQhCB//Z"
alt="Logo1" title="Logo1">
</div>
</td>


<td>
<div type="text" id="survey-name" class="survey-name survey-headers survey-name-image" placeholder="Untitled Survey" disabled="true" title="Help us improve how we serve the best community" aria-label="Help us improve how we serve the community">Help us improve how we serve the community</div>
</td>

<td>
<div id="uploadImage">
<img style="display: inline;" id="imgPreview" src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5OjcBCgoKDQwNGg8PGjclHyU3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3N//AABEIAH0AawMBIgACEQEDEQH/xAAbAAACAwEBAQAAAAAAAAAAAAAAAwIEBQEGB//EADsQAAICAQEEBwQHBwUAAAAAAAECAAMEERIhMUEFE1FhcZGhIjJSgQYUFSNCYrEkU8HC0eHwMzRygpL/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8A+4whCAQhCAQhCAQMDM7IufKufHocpUm661Tv1+Be/tPLx4A6/PqrsNNavdcONdQ2iPHkPmROUZlrZApyMfqiylk+8Da6aa66cOI7ZCsJRUK6ECIPwiJw/vulbG5U1hNfzNvPps+cDVhCEAhCEAhCEAhCLuvqoQvdYlaD8TsAP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j/ku4+hHlNWZX0jovt6Otswjs5dSlqW79CP46QPN52T9v9P/AFGs7WBgNraeVlnZ+o+R7Z6NSFUAcBMD6L9HfZfRdVTENa46x3G/aLb+PhoPlNragNLxbNIlotmgcdoixpJzEtAW7axRMYYthA4CQdQdJpY+cxcW7SpkAAEt7toHJu/sPLvmUzaRmInW3AMdEX2nbsA3kwPW4eT9ZrLFCjKdllJB0OmvHnxliUeh0ZcTrHBVrWNhX4deA+Q0EvQCcYagg852EDz9lRxchsfT2Tq9J7uJX5cR3a9k4G3cZr9IYgyqdASti+0jjipHCYo2nLgrs3J/q1jl+Ydqn0gTJkW3wGhhugQIi2WWAjt7tZM4a347B0gU3XdEvLr1NpuGsrNTYx0VGJ8IFNjv0E1sLDPsYpGr2gPf+VOS/M+g75ynEGEEuvXrL23U0c2PaewDmZudG4hx6y1jbd9h2rX+I/07O6BbUBVAHATsIQCEIQCUs7AXIK21u1WQnuWJxEuwgYbpmo2l2Bj5H563NeviN8Pq/SGQNlKKMReba7beu79ZuQgY69AYr78prMhu2xtfTlJN9Hujxvpq6luTVHZPmJrQgYZwM/FcGi5MhB+C4b//AEP46xgfpNzs14eNQfjZy+ny0E2IQKOH0eKbGvvsa7Ib3rG/Qdg7pehCAQhCB//Z"
alt="Logo2" title="Logo2">
<td>

</tr>
</tbody>
</table>
</div>

关于html - 在左表上对齐图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55814509/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com