English 中文(简体)
• 如何使“心灵”和“材料倡议”卡片行动 but子保持一致?
原标题:How to align the CardContent and MaterialUI CardAction button?

我正在撰写一份复读申请,其中我使用了材料证明(和诱使 alignment调和 st)。 这是我的卡片法典:

<Card elevation={10} className="mb-3">
  <div className="row">
    <div className="col-md-4">
      <CardMedia
        image={
          tourspot.images.length !== 0
            ? tourspot.images[0].url
            : "/src/assets/no-image.png"
        }
        title="Tourspot Image"
        component="img"
        className="img-fluid"
      />
    </div>
    <div className="col-md-8">
      <CardContent>
        <Typography gutterBottom variant="h5" component="div">
          {tourspot.title}
        </Typography>
        <Typography component="p" className="mb-3">
          {tourspot.description}
        </Typography>
        <Typography variant="body2" color="text.secondary">
          {tourspot.location}
        </Typography>
      </CardContent>
      <CardActions>
        <Button variant="text" size="small">
          View Tourist Spot
        </Button>
      </CardActions>
    </div>
  </div>
</Card>;

However, I cannot get the text and the button to align, it looks like this currently: Card Image

任何帮助如何做到这一点?

我试图在纽芬兰和心脏行动中增加幅度,但不管我所增加多少幅度,他们都赢得了udge。

问题回答

<代码>CardContent 构成部分pavention: 16px。 The CardActions content has patter patter: 8px。 <代码>Button 构成部分pavention: 4px 5px

现在,你想要把卡多里特和卡多斯的婚礼结合起来。 你们也必须调整对布顿的婚礼。 假设你不想离开,为Button做正确的dding。 您可以采取以下措施:

<CardActions
  style={{
    padding: "16px",
  }}
>
  <Button
    variant="text"
    size="small"
    style={{
      padding: "4px 0",
    }}
  >
    View Tourist Spot
  </Button>
</CardActions>

我将布顿的左侧和右侧的dding锁定到零。

如果你想要的话,你可以采取以下措施:

<CardActions
  style={{
    padding: "16px 16px 16px 11px",
  }}
>
  <Button
    variant="text"
    size="small"
  >
    View Tourist Spot
  </Button>
</CardActions>

我从心脏病中减去了5px。





相关问题
select multiple files in file upload in php? [duplicate]

Possible Duplicate: How to select multiple files for upload? i know that php doesn t allow you to select multiple files to upload in one box. is there a work around or do you have to learn ...

Connecting Actionscript 3.0 with a C++ backend?

I am curious to know if there is a way of connecting a flash front-end to a C++ driven backend? I m not currently working on a project that involves this, but I found out about an application used in ...

PHP searchable catalog design

I m working on a PHP Real Estate catalog. I am working on the search part right now and I m having trouble with the logic. Should the default view show all items in the catalog or the search page? ...

jquery image preview that work on ajax embedded image links?

there are various good jquery image preview plugins out there. however, all of the ones i ve tested havent worked on image links that are embedded in the DOM with ajax. i have tested use jquery live ...

Why should I use XFN in my HTML?

What is the benefit of using XFN (XHTML Friends Network)? I ve seen this on multiple blogs and social networking sites but I don t really understand why it s useful. Other than being able to style ...

The modern way to clear floated content?

What s the modern way to clear floated content these days? There s the "recent" modern way of adding a ".clearfix" on the parent element to clear the contained floats and that would work great. In ...

create a "show up" window when you click register?

im a backend programmer who wants to have a window that appears in front of the current window when clicking "register". so that you dont have to redirect to another page. i think u guys know what i ...

热门标签