css – Como deixar o background responsivo

Estou Criando um site para o desafio do frontendmentor, ele vem com 2 círculos .svg para serem usados como background, no momento estou usando 3 @media para fazer os círculos ficarem posicionados certos na resolução 375px, 1336px e 1440px. Em outras resoluções os círculos ficam bem errados. Queria saber se é possível fazer com que os círculos acompanhem a mudança de resolução.

Website: https://lucasfernandodev.github.io/ProfileCardComponent/

Code:

body{

    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;

    font-family: 'Kumbh Sans', sans-serif;
    font-size: 18px;
    background-color: var(--Dark-cyan);
    background-image: url('../img/bg-pattern-top.svg'), url('../img/bg-pattern-bottom.svg');
    background-position: top 140% left -80%, bottom 195% right -80%;
    background-repeat: no-repeat;
    width: 100%;
    height: 100vh;
    max-width: 100%;
    max-height: 100vh;
    overflow: hidden;
}

@media (max-width: 375px){
    body{
        background-position: top 175% left 128%, bottom 220% right 120%
    }
}

@media (max-width: 1366px){
    body{
        background-position: top 140% left -80%, bottom 195% right -80%;
    }
}


@media (max-width: 1440px){
    body{
        background-position: top 185% left -60%, bottom 215% right -60%;
    }
}

plotting – How to properly write multiline text with LaTeX symbol in a frame and with background

I wanted to include a number of text-box with background color white inside a plot. The text inside the box will also have LaTex expressions as well as multiple lines.

Is there any way to include multiline text (including LaTeX symbol) inside a plot?

In addition I want to set frame and background color for the box.
I am currently using Epilog and Prolog to include such text.

  ListLinePlot(
  Table({k, 
  PDF(BinomialDistribution(50, p), k)}, {p, {0.3, 0.5, 0.8}}, {k, 0,50}), 
  Filling -> Axis, 
  FillingStyle -> Automatic,
  (**Option-1**)
  Epilog -> Text(Style(ToExpression("\text{E}_{x} \n text2", TeXForm, HoldForm),Bold),{30, 0.13}),
  (**Option-2**)
  Prolog -> {Inset(Framed( "E_{x}ntext2" , RoundingRadius -> 5,Background -> White), {45, 0.13})}
  (**Option-3**)
(*Prolog -> {Inset(Framed( MaTeX("E_{x}\n text2" ) , RoundingRadius -> 5,Background ->White),{45,0.13})}*)
   )

Option-1 fails writing E_{x} as well as breaking line.
Option-2 fails writing E_{x} but breaks line.
Option-3 is the one I wanted but it fails in breaking line.

Is there any way to achieve this.

Moreover I also wanted to ask, what should one do if one has to include say more that two text boxes?

css – How can I upload an image for background use using the Theme Editor in WordPress?

I’m learning WordPress from the book WordPress for Dummies. The author says to open the theme editor then use the style.css sheet. I uploaded the image to the twentyseventeen image folder via FileZilla. She gives this example to add a new background image and change the color to white:

background #FFFFFF
url(‘images/newbackground.gif’);

then she gives other property examples like
background-repeat: repeat-y;

I wasn’t able to change the image using the code the author gave. Where to I have to place this code and how to make this change.

I’ve used the following code in the footer.php template to add category archives to the homepage:

?php wp_list_categories(array(
‘style’ => ‘none’,
‘orderby’ => ‘name’,
‘show_count’ => true,
‘hierarchical’ => true,
‘depth’ => 1
)); ?>

So I know how to add code but I don’t know how to add the examples she gave for the background image.

I Will Remove Background and Edit images for $5

I Will Remove Background and Edit images

**Professional Work

**100% pen tool use

**Quick turnaround.

**3 Hours Express Delivery

**100% Satisfaction

Order with confidence!

If not happy, reimbursement is guaranteed!!!

You will receive it during a transparent PNG format, White background JPEG format, PSD format. So, once you order sure let me know please which format you want?

picture editing services…

• White Background

• Perfect background removal photo.

• Any background you need.

• Images Masking/Hair Masking.

• 100% transparent background.

• Drop Shadow/Natural Shadow

• Formats will be jpeg, PNG, PSD, RAW TIFF, etc.

• Best photo quality.

• Image resize/Cropping.

• Perfectly remove the edge.

• Color correction.

• Totally retouch.

• More realistic than before.

• Any special requirement if you have(we will fix together about it)

If you have any Question feel free to contact me.

Warm Regards,


Rifat

.(tagsToTranslate)photo(t)edit(t)image(t)editing(t)background(t)remov(t)remove(t)backgroun(t)resize(t)n(t)retouch

css – How do I set a darker background color on hover *without knowing the original color*?

I’ve tried everything related to filter and backdrop-filter, but nothing seems to work. I’ve searched online but not found a single article addressing this (which is odd).

I simply want to set the background-color to be slightly darker than the current color, without knowing the color in advanced. That is, I do not want to “hardcode” a specific color to change to, but want it to be dynamically determined from the original background-color.

I can almost swear that I had this working at one point, too, but something made me stop using it. Probably some glitch or bug or something which didn’t make it work as expected.

For example (this is not working code):

table tr { background-color: #FFF; }

table tr:hover { background-color: "original but 25% darker, meaning kind of greyish in this particular case"; }

I suspect that the reason that filter didn’t work was that it made the entire object brighter/darker — not just the background color. backdrop-filter appears to have no effect whatsoever on my end.

asp.net core – I need a background service that will wait for items to process without busy-waiting

Problem space: I have the concept of a Job that needs to be processed. Jobs need to be processed sequentially, as one may depend on another. It’s possible for a Job to be paused, in which case the next Job should not be started – the Job should either be explicitly continued, or cancelled, in order to get the next one to start.

If the background service doing these Jobs finishes, it should wait for an update to a RESTful resource before trying to start processing again. I don’t want the service to busy-wait.

public class ExecutionBackgroundService : BackgroundService
{
    private readonly IJob _job;
    private readonly AutoResetEvent _isRunning = new AutoResetEvent(true);

    public ExecutionBackgroundService(IJob job)
    {
        _job = job;
    }

    protected override async Task ExecuteAsync(CancellationToken stoppingToken)
    {
        // Required for the method to be executed asynchronously, allowing startup to continue.
        await Task.Yield();
        while (!stoppingToken.IsCancellationRequested)
        {
            _isRunning.WaitOne(); // blocks the thread, waiting for the event to be set by something else calling the Resume method
            await _job.Process();
        }
    }

    /// <summary>
    /// Notifies the background service to resume processing.
    /// </summary>
    public void Resume()
    {
        _isRunning.Set();
    }
}

Jobs are represented by a DB entity. The IJob implementation looks something like this:

    public async Task Process()
    {
        using var scope = _serviceScopeFactory.CreateScope();
        var database = scope.ServiceProvider.GetService<MyDbContext>();
        var iterator = new DatabaseJobIterator(database);
        var worker = scope.ServiceProvider.GetService<IWorker>();
        while (iterator.HasNext())
        {
            await worker.DoLongRunningWork(iterator.Next);
        }
    }

Where the implementing class is singleton-scoped, and the DB and IWorker are both request-scoped (hence why I’m getting them using the scope factory).

DatabaseJobIterator is basically a simplified IEnumerator that just exposes two methods HasNext and Next, where HasNext will query the database for the oldest job, and assign it to Next. If the job is ready to be processed, it returns true.

An API controller that handles POSTs and PUTs to Jobs will then just call Resume on the background service, indicating that it might have new items to process if it isn’t already running.

My question is whether I’ve used the AutoResetEvent correctly. Is there a more standard way to get the background service to wait without e.g. busy-waiting in a while (true) loop?

color – Background colour suitable for both black and white text

Foreground light blue, white, gray, yellow color texts are present. Colors that don’t go with black color background are not visible.

I’ll withold judgement until I actually see an image or link to your design, but it sounds like you’re already trying to mix oil and water. There probably isn’t a background color to solve that problem, so let’s address the more interesting question…


You ask for

a background color that goes with both black and white foreground text color.

The right orange (and many other hues) can pull that off. See this paletton, and imagine it with a heavier font:

enter image description here

The white and black text are acceptably readable (to me, at least). But that color as a full page background would be overwhelming. Here’s the same palette desaturated a bit:

enter image description here

I think that looks ugly, but the black/white text is still fairly readable. Let’s desaturate to almost gray:

enter image description here

Now it’s more of a warm gray, and it doesn’t look so bad. But we’re starting to run up against the problem that ecc’s answer mentioned. Let’s fully desaturate to see what I mean:

enter image description here

Without the color saturation, the white and black text are too similar to the background, so they will be difficult and/or tiresome to read.

IMO, the second version (slightly desaturated) isn’t overwhelming and the text contrast is acceptable. Too bad it looks like grasshopper vomit.

Finally, keep in mind that any of the above versions will look very close to the grayscale version under certain kinds of colorblindness (dyschromatopsia and achromatopsia). That’s one of the reasons for this principle:

Background and text colors should have high value contrast, because hue and saturation contrast are too dependent upon individual perception and monitor/printer representation.

By using text that is white (value == 255) and black (value == 0), you are limited to a value contrast with the background of at most 127 (the middle of that range). For the sake of readability for most people on most devices, you should choose either bright text on a dark background, or dark text on a bright background. You can have bright text and dark text on the same page, just make sure they have different backgrounds:

enter image description here

Text background for a div

I've found code that lets me have text as a watermark and I'm wanting something like that but not for the page – just for the div it's attached to. The techniques I've seen all utilise ::before or ::after and absolute positioning. Here's what I get if I change it to relative

View attachment 259776

This is going to be a pdf and it would have the heading repeated behind the text in pale grey.

I've got a fiddle at http://jsfiddle.net/bteghy3a/

But obviously, I have some way…

Text background for a div