Comments (1)
I tried your code sample, if I change border: 10px 0 0 0;
to border: 10px solid transparent;
, and add border-image-slice: 1;
, I get :
But I think you want to create a border inside, right ? If so, I recommend you to create a div (wrapper) inside the vertical-timeline-element-content
element and remove the padding of .vertical-timeline-element-content
.
<VerticalTimelineElement
className="vertical-timeline-element--work"
date="2011 - present"
iconStyle={{ background: 'rgb(33, 150, 243)', color: '#fff' }}
icon={<WorkIcon />}
>
<div className="vertical-timeline-element-content-box">
<h3 className="vertical-timeline-element-title">Creative Director</h3>
<h4 className="vertical-timeline-element-subtitle">Miami, FL</h4>
<p>
Creative Direction, User Experience, Visual Design, Project Management, Team Leading
</p>
</div>
</VerticalTimelineElement>
.vertical-timeline-element {
.vertical-timeline-element-content-box {
padding: 1em;
border-radius: 0.25em;
border: 4px solid transparent;
border-image: linear-gradient(to right, #000000, #0098ED);
border-image-slice: 1;
}
.vertical-timeline-element-content::before {
border-left-color: #0098ED;
}
@media only screen and (min-width: 1170px) {
.vertical-timeline-element-content .vertical-timeline-element-date {
left: 136%;
}
&:nth-child(even):not(.vertical-timeline-element--left) .vertical-timeline-element-content .vertical-timeline-element-date, .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content .vertical-timeline-element-date {
right: 136% !important;
}
}
}
from react-vertical-timeline.
Related Issues (20)
- How to modify style.min.css for custom styling
- enhancement: Ability to add custom breakpoints
- How to remove vertical line and icons HOT 1
- Can't find a way to remove connector below last item HOT 1
- change lineColor for tailwind dark mode HOT 2
- The white line not showing on the first render in NextJS 13 HOT 3
- No props for icon box shadow
- TypeError: Cannot read properties of undefined (reading 'prototype') HOT 3
- Animation Issue in Timeline when Loading More Items HOT 5
- In Next js 13.5 react-vertical-timeline not working HOT 35
- Typescript Error HOT 8
- [QUESTION] does react-vertical-timeline support live feed, out of the box? HOT 1
- Receiving warning: extra attributes from the server: style when using component HOT 1
- How do i change the border type for the sideline??
- Does the react-vertical-timeline-component doesn't work in latest next.js? HOT 17
- Have the 2 columns layaut also in mobile HOT 1
- VerticalTimelineElement doesn't properly center all icon elements HOT 4
- "Unable to resolve dependency tree" HOT 1
- how to customize width of the element HOT 1
- não funciona
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-vertical-timeline.