将照片放在左侧,将带有“关于我”按钮的说明放在右侧
我的代码有问题。
当我更正它时,我左侧的照片消失了,并且描述的格式和关于我的按钮没有出现
所以我的问题是:
代码如下:
<div class="image">
<img src="images/photo ze.jpg" alt="">
</div>
<div class="content">
<h1>My name is José Moreira, I am
<span
class="txt-rotate"
date-period="2000"
data-rotate='[ "Graphic Design.", "Photographer.", "Web developer.",]'></span>
</h1>
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Optio doloribus ullam at commodi sit, excepturi dicta minus cumque rerum quod nisi sapiente accusantium, accusamus a atque totam adipisci. Who, error?</p>
<a href="#about" class="btn">about me</a>
</div>
完整的代码位于:
https://jsfiddle.net/Quencyjones79/zrp9e12g/1/
https://codepen.io/Quencyjones79/pen/GRyZQeG
我非常感谢您的帮助。
I'm having problems with the code.
When I corrected it, my photo on the left side disappeared and the formatting of the description and about me button does not appear
So my question is:
The code is below:
<div class="image">
<img src="images/photo ze.jpg" alt="">
</div>
<div class="content">
<h1>My name is José Moreira, I am
<span
class="txt-rotate"
date-period="2000"
data-rotate='[ "Graphic Design.", "Photographer.", "Web developer.",]'></span>
</h1>
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Optio doloribus ullam at commodi sit, excepturi dicta minus cumque rerum quod nisi sapiente accusantium, accusamus a atque totam adipisci. Who, error?</p>
<a href="#about" class="btn">about me</a>
</div>
The complete code is at:
https://jsfiddle.net/Quencyjones79/zrp9e12g/1/
https://codepen.io/Quencyjones79/pen/GRyZQeG
I greatly appreciate your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 CSS 中,您设置了以下
img
属性。将display: none;
应用于img
选择器后,页面上的图像将不可见,除非您使用另一个更具体的 CSS 规则覆盖该规则。显示您关心的图像的一种方法是将
display: inline
添加到.home .image img{}
选择器。我并不是说这是最好的方法,但它展示了如何定位您关心的特定图像并更改其显示属性。您还可以从img
中删除display: none
属性。如果您有兴趣,了解如何使用开发者工具调试 CSS 。
In your CSS, you have the following
img
properties set. Withdisplay: none;
applied to theimg
selector, images on the page will not be visible unless you override the rule with another, more specific CSS rule.One way to get the image you are concerned with to appear would be to add
display: inline
to the.home .image img{}
selector. I'm not saying this is the best approach, but it shows how to target the specific image you are concerned with and change its display property. You could also just remove thedisplay: none
property fromimg
.If you're interested, learn how to debug CSS with developer tools.